Edit This Code:
See Result »
<!DOCTYPE html> <html> <head> <script src="../../ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script> <script> $(document).ready(function(){ $("p").filter(".intro").css("background-color", "yellow"); }); </script> </head> <body> <h1>Welcome to My Homepage</h1> <p>My name is Donald.</p> <p class="intro">I live in Duckburg.</p> <p class="intro">I love Duckburg.</p> <p>My best friend is Mickey.</p> </body> <!-- Mirrored from www.w3schools.com/jquery/tryit.asp?filename=tryjquery_filter by HTTrack Website Copier/3.x [XR&CO'2014], Sun, 13 Mar 2016 11:03:05 GMT --> </html>
Result: