Javascript examples for jQuery Method and Property:filter
Filter element returned from document.getElementById()
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("p").filter(document.getElementById("intro")).css("background-color", "yellow"); });//ww w. j a v a 2s . c o m </script> </head> <body> <h1>Welcome to My Homepage</h1> <p>test</p> <p id="intro">test</p> <p>test</p> </body> </html>