Prev Demo
jQuery
>
Mutliple Selector
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title>Demo</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> </head> <body> <h1>Multiple selector.</h1> <p>This is NOT SELECTED for style</p> <p class="class1">This is SELECTED for style</p> <p class="class2">This is NOT SELECTED for style</p> <div id="p1">This is SELECTED for style</div> <script language="javascript" type="text/javascript"> $("p.class1, #p1").css("border", "5px solid green"); </script> </body> </html>
Note: We DO NOT save your trial code in our database.
Output