Javascript examples for jQuery Method and Property:not
Remove by id and class from the selected elements
<!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").not(".intro, #outro").css("background-color", "yellow"); });//from www. ja v a 2 s . co m </script> </head> <body> <h1>Welcome to My Homepage</h1> <p>test</p> <p class="intro">test</p> <p id="outro">test</p> <p>test</p> </body> </html>