All Selector - select all elements in a page- jQuery
home
Run
screen_rotation
fullscreen
cloud_download
<!DOCTYPE html> <html> <head> <title>jQuery All Selector(*) 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(){ $("*").css("border","4px solid black"); $("*").css("padding","50px;"); $("*").css("margin","5px;"); var countTotalElement = $("*").length; $("body").append("<h4>Total Items Found = "+countTotalElement+" </h4>"); }); </script> </head> <body> <div> Div One.. </div> <br> <div> Div Two.. </div> <p> Paragraph.. </p> <span> Span... </span> </body> </html>
<!DOCTYPE html> <html> <head> <title>jQuery All Selector(*) 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(){ $("*").css("border","4px solid black"); $("*").css("padding","50px;"); $("*").css("margin","5px;"); var countTotalElement = $("*").length; $("body").append("<h4>Total Items Found = "+countTotalElement+" </h4>"); }); </script> </head> <body> <div> Div One.. </div> <br> <div> Div Two.. </div> <p> Paragraph.. </p> <span> Span... </span> </body> </html>
Copyrights@tutorialsplane.com