Home
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <script> $(document).ready(function () { $("div:contains('tutorialsteacher')").append(" - This element contains tutorialsteacher"); }); </script> </head> <body> <h1>CSS Selector: element:contains('value')</h1> <div class="myClstest"> tutorialsteacher </div> <div class="test1"> Hello World! </div> <div class="myCls_Class"> Welcome to tutorialsteacher site </div> <span class="myCls"> <p>Paragraph 1</p> </span> </body> </html>
Result: