December 2013
Intermediate to advanced
384 pages
9h 54m
English
$("p:contains('free')"); //selects <p> elements that contain "free $("div:has(span)"); //selects <div> elements that contain <span> elements $("div:empty"); //selects <div> elements with no content or children $("div:parent"); //selects <div> elements that have at least some content
Another set of useful jQuery selectors are the content filter selectors. These selectors allow you to select HTML elements based on the content inside the HTML element. Table 4.3 shows examples of using content selectors.
Table 4.3 Examples of Using Content jQuery Selectors
Read now
Unlock full access