{"id":8252,"date":"2015-11-16T16:15:47","date_gmt":"2015-11-16T14:15:47","guid":{"rendered":"http:\/\/www.webcodegeeks.com\/?p=8252"},"modified":"2017-12-21T15:44:57","modified_gmt":"2017-12-21T13:44:57","slug":"jquery-selector-example","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-selector-example\/","title":{"rendered":"jQuery Selector Example"},"content":{"rendered":"<p>The aim of this example is to go through some of the most important and used jQuery selectors widely used over websites to achieve specific results depending on the case.<\/p>\n<p>Selectors can be considered as identifiers for jQuery to match what is written in the quotes with what is actually part of the document, and not necessarily what we write inside the quotes should be found in the same exact written form anywhere in the code, like pseudo-selectors, that are a &#8220;hidden&#8221;.<\/p>\n<p>Once a selector is selected by jQuery, any method can be applied to it.<\/p>\n<p>Now jQuery offers a wide range of selectors, which will normally fit to your every need, like selecting all elements, id&#8217;s, classes, elements which fulfill a condition etc.<br \/>\n[ulp id=&#8217;qGGDqWnle19VavkM&#8217;]<\/p>\n<h2>1. Basic Setup<\/h2>\n<p>Before we begin with examples, create a new HTML document and add the following basix syntax inside:<\/p>\n<pre class=\"brush:xml\">\r\n&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n\t&lt;title&gt;jQuery Selectors Example&lt;\/title&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\r\n&lt;!-- HTML SECTION  --&gt;\r\n\r\n\r\n&lt;!-- JAVASCRIPT SECTION  --&gt;\r\n&lt;script src=\"jquery-1.11.3.min.js\"&gt;&lt;\/script&gt;\r\n\r\n&lt;script type=\"text\/javascript\"&gt;\r\n$(document).ready(function(){\r\n    \/\/ js code goes here\r\n});\r\n&lt;\/script&gt;\r\n\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<p>Note that the jQuery library is linked locally in the code above. To download it, please go <a href=\"https:\/\/jquery.com\/download\/\" target=\"_blank\">here<\/a>.<\/p>\n<h2>2. Basic jQuery Selectors<\/h2>\n<p>The following selectors represent the basic ones that are used most widely across web projects.<\/p>\n<h3>2.1 <strong>*<\/strong> for ALL<\/h3>\n<p><code>$(\"*\")<\/code> &#8211; selects all elements. The * selector selects all elements in the document, including html, head and body.<\/p>\n<pre class=\"brush:xml\">\r\n&lt;!-- HTML SECTION  --&gt;\r\n&lt;h1&gt;This is Web Code Geeks.&lt;\/h1&gt;\r\n&lt;p&gt;Lorem ipsum dolor sit amet&lt;\/p&gt;\r\n&lt;span&gt;Span elements are cool&lt;\/span&gt;\r\n&lt;p&gt;What color is this?&lt;\/p&gt;\r\n\r\n&lt;ul&gt;\r\n  &lt;li&gt;Red&lt;\/li&gt;\r\n  &lt;li&gt;Yellow&lt;\/li&gt;\r\n  &lt;li&gt;Green&lt;\/li&gt;\r\n&lt;\/ul&gt;\r\n<\/pre>\n<p>In this example, we&#8217;re giving all elements a yellow background color.<\/p>\n<pre class=\"brush:js\">\r\n\/\/ JAVASCRIPT SECTION  \r\n    $(\"*\").css(\"background-color\", \"yellow\");\r\n<\/pre>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-1.jpg\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-1.jpg\" alt=\"selectors-1\" width=\"820\" height=\"327\" class=\"aligncenter size-full wp-image-8263\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-1.jpg 820w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-1-300x120.jpg 300w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><\/p>\n<h3>2.2 <strong>#id<\/strong> <\/h3>\n<p><code>$(\"#element\")<\/code> &#8211; select the element with id=&#8221;element&#8221;. The #id selector selects the element with the specific id.<\/p>\n<pre class=\"brush:xml\">\r\n&lt;!-- HTML SECTION  --&gt;\r\n&lt;p&gt;Lorem ipsum dolor sit amet.&lt;\/p&gt;\r\n&lt;h3 id=\"element\"&gt;I am the selected blue element.&lt;\/h3&gt;\r\n<\/pre>\n<pre class=\"brush:js\">\r\n\/\/ JAVASCRIPT SECTION  \r\n    $(\"#element\").css(\"color\", \"blue\");\r\n<\/pre>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-2.jpg\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-2.jpg\" alt=\"selectors-2\" width=\"820\" height=\"153\" class=\"aligncenter size-full wp-image-8265\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-2.jpg 820w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-2-300x56.jpg 300w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><\/p>\n<h3>2.3 <strong>.class<\/strong><\/h3>\n<p><code>$(\".random\")<\/code> &#8211; select the element with class=&#8221;random&#8221;. The .class selector selects all elements with the specific class. The class refers to the class attribute of an HTML element.<\/p>\n<pre class=\"brush:xml\">\r\n&lt;!-- HTML SECTION  --&gt;\r\n&lt;p class=\"random\"&gt;Lorem ipsum dolor sit amet.&lt;\/p&gt;\r\n&lt;h3&gt;I am the selected blue element.&lt;\/h3&gt;\r\n<\/pre>\n<pre class=\"brush:js\">\r\n\/\/ JAVASCRIPT SECTION  \r\n    $(\".random\").css(\"background-color\", \"yellow\");\r\n<\/pre>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-3.jpg\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-3.jpg\" alt=\"selectors-3\" width=\"820\" height=\"153\" class=\"aligncenter size-full wp-image-8274\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-3.jpg 820w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-3-300x56.jpg 300w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><\/p>\n<h3>2.4 <strong>element<\/strong><\/h3>\n<p><code>$(\"span\")<\/code> &#8211; select all <span><\/span> elements. The element selector selects all elements with the specific element name.<\/p>\n<pre class=\"brush:xml\">\r\n&lt;!-- HTML SECTION  --&gt;\r\n&lt;p&gt;Only the following span elements are going to be selected&lt;\/p&gt;\r\n&lt;span&gt;I am span one.&lt;\/span&gt;\r\n&lt;span&gt;I am span two.&lt;\/span&gt;\r\n&lt;span&gt;I am span three.&lt;\/span&gt;\r\n<\/pre>\n<pre class=\"brush:js\">\r\n\/\/ JAVASCRIPT SECTION  \r\n    $(\"span\").css(\"border\", \"1px solid black\");\r\n<\/pre>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-4.jpg\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-4.jpg\" alt=\"selectors-4\" width=\"820\" height=\"153\" class=\"aligncenter size-full wp-image-8276\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-4.jpg 820w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-4-300x56.jpg 300w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><\/p>\n<h3>2.5 <strong>el1,el2,el3<\/strong> or <strong>.class1, .class2<\/strong> or <strong>#id1, #id2,<\/strong> &#8230;<\/h3>\n<p>Select multiple elements, classes or id&#8217;s by separating them with a comma:<\/p>\n<pre class=\"brush:xml\">\r\n&lt;!-- HTML SECTION  --&gt;\r\n&lt;div&gt;I am a simple div element&lt;\/div&gt;\r\n&lt;p&gt;Paragraph element lorem ipsum dolor sit amet&lt;\/p&gt;\r\n\r\n&lt;h3 class=\"class1\"&gt;I am class one heading&lt;\/h3&gt;\r\n&lt;h3 class=\"class2\"&gt;I am class two heading&lt;\/h3&gt;\r\n\r\n&lt;span id=\"id1\"&gt;I am id one span&lt;\/span&gt;\r\n&lt;span id=\"id2\"&gt;I am id2 span&lt;\/span&gt;\r\n<\/pre>\n<pre class=\"brush:js\">\r\n\/\/ JAVASCRIPT SECTION  \r\n   $(\"div, p\").css({\"background-color\": \"#c0392b\", \"color\":\"white\", \"padding\":\"5px\"});\r\n   $(\".class1, .class2\").css({\"background-color\": \"#16a085\", \"color\":\"white\", \"padding\":\"5px\"});\r\n   $(\"#id1, #id2\").css({\"background-color\": \"#2c3e50\", \"color\":\"white\", \"padding\":\"5px\"});\r\n<\/pre>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-5.jpg\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-5.jpg\" alt=\"selectors-5\" width=\"820\" height=\"293\" class=\"aligncenter size-full wp-image-8280\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-5.jpg 820w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-5-300x107.jpg 300w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><\/p>\n<h2>3. Pseudo Selectors<\/h2>\n<p>Now let&#8217;s get deeper into selectors. In this section, we focus on using pseudo-selectors.<\/p>\n<h3>3.1 <strong>:first<\/strong> and <strong>:last<\/strong> <\/h3>\n<p><code>$(\"p:first\")<\/code> or <code>$(\"p:last\")<\/code> &#8211; The :first selector selects the first element, and the :last selector selects the last element.<\/p>\n<pre class=\"brush:xml\">\r\n&lt;!-- HTML SECTION  --&gt;\r\n&lt;p&gt;I am paragraph one&lt;\/p&gt;\r\n&lt;p&gt;I am paragraph two&lt;\/p&gt;\r\n&lt;p&gt;I am paragraph three&lt;\/p&gt;\r\n<\/pre>\n<pre class=\"brush:js\">\r\n\/\/ JAVASCRIPT SECTION  \r\n    $(\"p:first\").css(\"background-color\", \"yellow\");\r\n    $(\"p:last\").css(\"background-color\", \"#eee\");\r\n<\/pre>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-6.jpg\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-6.jpg\" alt=\"selectors-6\" width=\"820\" height=\"125\" class=\"aligncenter size-full wp-image-8289\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-6.jpg 820w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-6-300x46.jpg 300w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><\/p>\n<h3>3.2 <strong>:odd<\/strong> and <strong>:even<\/strong> <\/h3>\n<p><code>$(\"p:odd\")<\/code> or <code>$(\"p:even\")<\/code> &#8211; The :even selector selects each element with an even index number (like: 0, 2, 4, etc.). The :odd selector selects each element with an odd index number (like: 1, 3, 5, etc.).<\/p>\n<pre class=\"brush:xml\">\r\n&lt;!-- HTML SECTION  --&gt;\r\n&lt;p&gt;I am paragraph one&lt;\/p&gt;\r\n&lt;p&gt;I am paragraph two&lt;\/p&gt;\r\n&lt;p&gt;I am paragraph three&lt;\/p&gt;\r\n<\/pre>\n<pre class=\"brush:js\">\r\n\/\/ JAVASCRIPT SECTION  \r\n    $(\"p:odd\").css(\"background-color\", \"yellow\");\r\n    $(\"p:even\").css(\"background-color\", \"#eee\");\r\n<\/pre>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-7.jpg\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-7.jpg\" alt=\"selectors-7\" width=\"820\" height=\"125\" class=\"aligncenter size-full wp-image-8291\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-7.jpg 820w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-7-300x46.jpg 300w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><\/p>\n<h3>3.3 <strong>:input<\/strong><\/h3>\n<p><code>$(\":input\")<\/code> &#8211; The :input selector selects form elements.<\/p>\n<pre class=\"brush:xml\">\r\n&lt;!-- HTML SECTION  --&gt;\r\n&lt;h4&gt;This is an input&lt;\/h4&gt;\r\nName: &lt;input type=\"text\" name=\"name\"&gt;\r\n&lt;p&gt;This is another input below:&lt;\/p&gt;\r\nPassword: &lt;input type=\"password\" name=\"pass\"&gt;\r\n<\/pre>\n<pre class=\"brush:js\">\r\n\/\/ JAVASCRIPT SECTION  \r\n    $(\":input\").css(\"background-color\", \"yellow\");\r\n<\/pre>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-8.jpg\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-8.jpg\" alt=\"selectors-8\" width=\"820\" height=\"195\" class=\"aligncenter size-full wp-image-8295\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-8.jpg 820w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-8-300x71.jpg 300w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><\/p>\n<h3>3.4 Input elements <strong>:type<\/strong><\/h3>\n<p><code>$(\":type\")<\/code> &#8211; The :type selector selects input elements with type=type.<\/p>\n<pre class=\"brush:xml\">\r\n&lt;!-- HTML SECTION  --&gt;\r\nName: &lt;input type=\"text\" name=\"name\"&gt; &lt;br\/&gt;&lt;br\/&gt;\r\nPassword: &lt;input type=\"password\" name=\"pass\"&gt;&lt;br\/&gt;&lt;br\/&gt;\r\nSubmit: &lt;input type=\"submit\"&gt;&lt;br\/&gt;&lt;br\/&gt;\r\nButton: &lt;input type=\"button\" value=\"Send\"&gt;\r\n<\/pre>\n<pre class=\"brush:js\">\r\n\/\/ JAVASCRIPT SECTION  \r\n    $(\":text\").css(\"background-color\", \"yellow\");\r\n    $(\":password\").css(\"background-color\", \"red\");\r\n<\/pre>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-9.jpg\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-9.jpg\" alt=\"selectors-9\" width=\"820\" height=\"195\" class=\"aligncenter size-full wp-image-8298\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-9.jpg 820w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-9-300x71.jpg 300w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><br \/>\nHere, we demonstrated the selection of two of the input types. The same syntax goes for all of them including:<br \/>\n<code>:radio<\/code>, <code>:checkbox<\/code>, <code>:submit<\/code>, <code>:reset<\/code>, <code>:button<\/code>, <code>:image<\/code>, <code>:file<\/code>.<\/p>\n<h3>3.5 <strong>:enabled<\/strong> and <strong>:disabled<\/strong><\/h3>\n<p><code>$(\":enabled\")<\/code> and <code>$(\":disabled\")<\/code>&#8211; The :enabled selector selects all enabled form elements. The :disabled selector selects all disabled form elements.<\/p>\n<pre class=\"brush:xml\">\r\n&lt;!-- HTML SECTION  --&gt;\r\n&lt;form action=\"\"&gt;\r\nName: &lt;input type=\"text\" name=\"user\"&gt;&lt;br&gt;&lt;br&gt;\r\nID:&lt;input type=\"text\" name=\"id\" disabled=\"disabled\"&gt;\r\n&lt;br&gt;&lt;br&gt;\r\nAge:\r\n&lt;select disabled=\"disabled\"&gt;\r\n  &lt;option&gt;20-30&lt;\/option&gt;\r\n  &lt;option&gt;30-50&lt;\/option&gt;\r\n  &lt;option&gt;50+&lt;\/option&gt;\r\n&lt;\/select&gt;\r\n&lt;br&gt;&lt;br&gt;\r\n&lt;input type=\"submit\"&gt;\r\n&lt;\/form&gt;\r\n<\/pre>\n<pre class=\"brush:js\">\r\n\/\/ JAVASCRIPT SECTION  \r\n    $(\":enabled\").css(\"background-color\", \"yellow\");\r\n    $(\":disabled\").css(\"background-color\", \"#eee\");\r\n<\/pre>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-10.jpg\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-10.jpg\" alt=\"selectors-10\" width=\"820\" height=\"195\" class=\"aligncenter size-full wp-image-8302\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-10.jpg 820w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-10-300x71.jpg 300w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><\/p>\n<h2>4. Relational Selectors<\/h2>\n<p>The following examples will be based on parent, child, sibling relations used to select elements.<\/p>\n<h3>4.1 <strong>parent &gt; child<\/strong><\/h3>\n<p><code>$(\"div &gt; p\")<\/code> &#8211; The (&#8220;parent &gt; child&#8221;) selector selects all elements that are a direct child of the specified element.<\/p>\n<pre class=\"brush:xml\">\r\n&lt;!-- HTML SECTION  --&gt;\r\n&lt;div&gt;\r\n    &lt;h4&gt;heading level four text&lt;\/h4&gt;\r\n    &lt;p&gt;Lorem ipsum dolor sit amet&lt;\/p&gt;\r\n    &lt;span&gt;span element inline&lt;\/span&gt;\r\n&lt;\/div&gt;\r\n<\/pre>\n<pre class=\"brush:js\">\r\n\/\/ JAVASCRIPT SECTION  \r\n    $(\"div &gt; p\").css(\"background-color\", \"yellow\");\r\n<\/pre>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-11.jpg\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-11.jpg\" alt=\"selectors-11\" width=\"820\" height=\"195\" class=\"aligncenter size-full wp-image-8304\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-11.jpg 820w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-11-300x71.jpg 300w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><\/p>\n<h3>4.2 <strong>parent descendant<\/strong><\/h3>\n<p><code>$(\"parent descendant\")<\/code> &#8211; The (&#8220;parent descendant&#8221;) selector selects all elements that are descendants of a specified element.<\/p>\n<pre class=\"brush:xml\">\r\n&lt;!-- HTML SECTION  --&gt;\r\n&lt;div&gt;\r\n    &lt;h4&gt;heading level four text&lt;\/h4&gt;\r\n    &lt;p&gt;this is a paragraph &lt;span&gt;span element inline&lt;\/span&gt;&lt;\/p&gt;\r\n    &lt;article&gt;Lorem ipsum dolor sit amet, isnt all corupsu tringun&lt;\/article&gt;\r\n    &lt;br&gt;&lt;span&gt;another span element to show selection&lt;\/span&gt;\r\n&lt;\/div&gt;\r\n<\/pre>\n<pre class=\"brush:js\">\r\n\/\/ JAVASCRIPT SECTION  \r\n    $(\"div span\").css(\"background-color\", \"yellow\");\r\n<\/pre>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-12.jpg\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-12.jpg\" alt=\"selectors-12\" width=\"820\" height=\"195\" class=\"aligncenter size-full wp-image-8308\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-12.jpg 820w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-12-300x71.jpg 300w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><\/p>\n<h3>4.3 <strong>element + next<\/strong><\/h3>\n<p><code>$(\"div + p\")<\/code> &#8211; The (&#8220;element + next&#8221;) selector selects the &#8220;next&#8221; element of the specified &#8220;element&#8221;. The &#8220;next&#8221; element must be placed right after the specified &#8220;element&#8221; to be selected.<\/p>\n<pre class=\"brush:xml\">\r\n&lt;!-- HTML SECTION  --&gt;\r\n&lt;div&gt;&lt;h4&gt;This is the main div element&lt;\/h4&gt;&lt;\/div&gt;\r\n&lt;p&gt;I am the first paragraph and the next after the div&lt;\/p&gt;\r\n&lt;p&gt;I am the second paragraph and the next after the first para&lt;\/p&gt;\r\n&lt;p&gt;I am the third paragraph and the next after the second para&lt;\/p&gt;\r\n<\/pre>\n<pre class=\"brush:js\">\r\n\/\/ JAVASCRIPT SECTION  \r\n    $(\"div + p\").css(\"background-color\", \"yellow\");\r\n<\/pre>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-13.jpg\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-13.jpg\" alt=\"selectors-13\" width=\"820\" height=\"195\" class=\"aligncenter size-full wp-image-8310\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-13.jpg 820w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-13-300x71.jpg 300w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><\/p>\n<h3>4.4 <strong>element ~ siblings<\/strong><\/h3>\n<p><code>$(\"element ~ siblings\")<\/code> &#8211; The (&#8220;element ~ siblings&#8221;) selector selects all elements that are siblings of the specified &#8220;element&#8221;.<\/p>\n<pre class=\"brush:xml\">\r\n&lt;!-- HTML SECTION  --&gt;\r\n&lt;h4&gt;Heading element is here&lt;\/h4&gt;\r\n&lt;div style=\"border: 1px solid black; padding: 1em;\"&gt;This is a div element&lt;\/div&gt;\r\n&lt;p&gt;I am a sibling to the div element&lt;\/p&gt;\r\n&lt;p&gt;I am also a sibling&lt;\/p&gt;\r\n\r\n&lt;div style=\"border: 1px solid black; padding: 1em\"&gt;&lt;p&gt;I am not a sibling, I am inside the div, so I will not be selected.&lt;\/p&gt;&lt;\/div&gt;\r\n\r\n&lt;h3&gt;Here is another sibling to the first div&lt;\/h3&gt;\r\n&lt;p&gt;I am the last sibling here&lt;\/p&gt;\r\n<\/pre>\n<pre class=\"brush:js\">\r\n\/\/ JAVASCRIPT SECTION  \r\n    $(\"div ~ p\").css(\"background-color\", \"yellow\");\r\n<\/pre>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-14.jpg\"><img decoding=\"async\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-14.jpg\" alt=\"selectors-14\" width=\"820\" height=\"397\" class=\"aligncenter size-full wp-image-8314\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-14.jpg 820w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/selectors-14-300x145.jpg 300w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><\/p>\n<h2>5. Conclusion<\/h2>\n<p>To conclude, it is important to note that jQuery is very flexible with selectors, which means you are not limited to either tags, classes, id&#8217;s or any other single selector. It offers such a wide range of selectors and also the possibility to combine them together and select multiple elements at the very same time. It is your choice. There are also other selectors not mentioned here (maybe not used that much, that&#8217;s why) that you can have a look at the official jQuery documentation.<\/p>\n<h2>6. Download<\/h2>\n<div class=\"download\"><strong>Download<\/strong><br \/>\nYou can download the full source code of this example here: <a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/jQuery-Selectors.zip\"><strong>jQuery Selectors<\/strong><\/a>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>The aim of this example is to go through some of the most important and used jQuery selectors widely used over websites to achieve specific results depending on the case. Selectors can be considered as identifiers for jQuery to match what is written in the quotes with what is actually part of the document, and &hellip;<\/p>\n","protected":false},"author":75,"featured_media":919,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[],"class_list":["post-8252","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-jquery"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>jQuery Selector Example - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"The aim of this example is to go through some of the most important and used jQuery selectors widely used over websites to achieve specific results\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-selector-example\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"jQuery Selector Example - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"The aim of this example is to go through some of the most important and used jQuery selectors widely used over websites to achieve specific results\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-selector-example\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webcodegeeks\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/fabiocimo\" \/>\n<meta property=\"article:published_time\" content=\"2015-11-16T14:15:47+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-12-21T13:44:57+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Fabio Cimo\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@fabiocimo\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Fabio Cimo\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-selector-example\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-selector-example\/\"},\"author\":{\"name\":\"Fabio Cimo\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/1dfb88b4a8d08c37a6080311fd330a22\"},\"headline\":\"jQuery Selector Example\",\"datePublished\":\"2015-11-16T14:15:47+00:00\",\"dateModified\":\"2017-12-21T13:44:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-selector-example\/\"},\"wordCount\":637,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-selector-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg\",\"articleSection\":[\"jQuery\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-selector-example\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-selector-example\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-selector-example\/\",\"name\":\"jQuery Selector Example - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-selector-example\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-selector-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg\",\"datePublished\":\"2015-11-16T14:15:47+00:00\",\"dateModified\":\"2017-12-21T13:44:57+00:00\",\"description\":\"The aim of this example is to go through some of the most important and used jQuery selectors widely used over websites to achieve specific results\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-selector-example\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-selector-example\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-selector-example\/#primaryimage\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-selector-example\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JavaScript\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/javascript\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"jQuery\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/javascript\/jquery\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"jQuery Selector Example\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"name\":\"Web Code Geeks\",\"description\":\"Web Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webcodegeeks\",\"https:\/\/x.com\/webcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/1dfb88b4a8d08c37a6080311fd330a22\",\"name\":\"Fabio Cimo\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b3df055f2e1b62e238889fafbb16121c68aab1adcd11af670e185cafae201b3b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b3df055f2e1b62e238889fafbb16121c68aab1adcd11af670e185cafae201b3b?s=96&d=mm&r=g\",\"caption\":\"Fabio Cimo\"},\"description\":\"Fabio is a passionate student in web tehnologies including front-end (HTML\/CSS) and web design. He likes exploring as much as possible about the world wide web and how it can be more productive for us all. Currently he studies Computer Engineering, at the same time he works as a freelancer on both web programming and graphic design.\",\"sameAs\":[\"https:\/\/www.facebook.com\/fabiocimo\",\"https:\/\/al.linkedin.com\/in\/fabiocimo\",\"https:\/\/x.com\/fabiocimo\",\"https:\/\/www.youtube.com\/fabiocimo1\"],\"url\":\"https:\/\/www.webcodegeeks.com\/author\/fabio-cimo\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"jQuery Selector Example - Web Code Geeks - 2026","description":"The aim of this example is to go through some of the most important and used jQuery selectors widely used over websites to achieve specific results","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-selector-example\/","og_locale":"en_US","og_type":"article","og_title":"jQuery Selector Example - Web Code Geeks - 2026","og_description":"The aim of this example is to go through some of the most important and used jQuery selectors widely used over websites to achieve specific results","og_url":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-selector-example\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_author":"https:\/\/www.facebook.com\/fabiocimo","article_published_time":"2015-11-16T14:15:47+00:00","article_modified_time":"2017-12-21T13:44:57+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg","type":"image\/jpeg"}],"author":"Fabio Cimo","twitter_card":"summary_large_image","twitter_creator":"@fabiocimo","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"Fabio Cimo","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-selector-example\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-selector-example\/"},"author":{"name":"Fabio Cimo","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/1dfb88b4a8d08c37a6080311fd330a22"},"headline":"jQuery Selector Example","datePublished":"2015-11-16T14:15:47+00:00","dateModified":"2017-12-21T13:44:57+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-selector-example\/"},"wordCount":637,"commentCount":0,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-selector-example\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg","articleSection":["jQuery"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-selector-example\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-selector-example\/","url":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-selector-example\/","name":"jQuery Selector Example - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-selector-example\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-selector-example\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg","datePublished":"2015-11-16T14:15:47+00:00","dateModified":"2017-12-21T13:44:57+00:00","description":"The aim of this example is to go through some of the most important and used jQuery selectors widely used over websites to achieve specific results","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-selector-example\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-selector-example\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-selector-example\/#primaryimage","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-selector-example\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"JavaScript","item":"https:\/\/www.webcodegeeks.com\/category\/javascript\/"},{"@type":"ListItem","position":3,"name":"jQuery","item":"https:\/\/www.webcodegeeks.com\/category\/javascript\/jquery\/"},{"@type":"ListItem","position":4,"name":"jQuery Selector Example"}]},{"@type":"WebSite","@id":"https:\/\/www.webcodegeeks.com\/#website","url":"https:\/\/www.webcodegeeks.com\/","name":"Web Code Geeks","description":"Web Developers Resource Center","publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.webcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webcodegeeks","https:\/\/x.com\/webcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/1dfb88b4a8d08c37a6080311fd330a22","name":"Fabio Cimo","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/b3df055f2e1b62e238889fafbb16121c68aab1adcd11af670e185cafae201b3b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b3df055f2e1b62e238889fafbb16121c68aab1adcd11af670e185cafae201b3b?s=96&d=mm&r=g","caption":"Fabio Cimo"},"description":"Fabio is a passionate student in web tehnologies including front-end (HTML\/CSS) and web design. He likes exploring as much as possible about the world wide web and how it can be more productive for us all. Currently he studies Computer Engineering, at the same time he works as a freelancer on both web programming and graphic design.","sameAs":["https:\/\/www.facebook.com\/fabiocimo","https:\/\/al.linkedin.com\/in\/fabiocimo","https:\/\/x.com\/fabiocimo","https:\/\/www.youtube.com\/fabiocimo1"],"url":"https:\/\/www.webcodegeeks.com\/author\/fabio-cimo\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/8252","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/users\/75"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=8252"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/8252\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media\/919"}],"wp:attachment":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media?parent=8252"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=8252"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=8252"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}