Posts

Showing posts with the label jQuery contains() example

jQuery contains() example

jQuery.contains() check to see true if both parameters are DOM nodes and the second parameter is contained inside the first. Syntax: $(“div:contains(jquery)”) // selects all elements matched by that contains the text “jquery″. Example: $(“div:contains(‘jquery’)”).css(“color”, “red”);