href attribute selector - jQuery
home
Run
screen_rotation
fullscreen
cloud_download
<!DOCTYPE html> <html> <head> <title>href attribute selector - jQuery Example</title> <script type="text/javascript" src="http://code.jquery.com/jquery-2.1.4.min.js"> </script> <script type="text/javascript"> $(document).ready(function(){ $("#demo").click(function(){ $("[href]").css("border","4px solid red"); $("[href]").css("color","blue"); $("[href]").css("font-size","26px"); }); }); </script> </head> <body> <a href="javascript:void(0)" id="demo"> Click Me </a> <ol> <li> <a href="javascript:void(0)">First Item</a> </li> <li> <a href="javascript:void(0)">Second Item </a></li> <li> <a href="javascript:void(0)">Third Item </a></li> </ol> </body> </html>
<!DOCTYPE html> <html> <head> <title>href attribute selector - jQuery Example</title> <script type="text/javascript" src="http://code.jquery.com/jquery-2.1.4.min.js"> </script> <script type="text/javascript"> $(document).ready(function(){ $("#demo").click(function(){ $("[href]").css("border","4px solid red"); $("[href]").css("color","blue"); $("[href]").css("font-size","26px"); }); }); </script> </head> <body> <a href="javascript:void(0)" id="demo"> Click Me </a> <ol> <li> <a href="javascript:void(0)">First Item</a> </li> <li> <a href="javascript:void(0)">Second Item </a></li> <li> <a href="javascript:void(0)">Third Item </a></li> </ol> </body> </html>
Copyrights@tutorialsplane.com