HTML Editor
<!DOCTYPE html> <html lang="en-US"> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> </head> <body> <h1>jQuery multiple Selector</h1> <p class="myClass">This is paragraph</p> <div id="myId">This is div</div> <a href="/css" class="myClass">Learn CSS</a> <ul> <li>apple</li> <li>Banana</li> </ul> <script> $(document).ready(function(){ $(".myClass, #myId, ul").css("color","green"); }); </script> </body> </html>
OUTPUT
×

Save as Private