HOW CAN YOU SELECT ALL ELEMENTS IN A PAGE USING JQUERY?

Arun Singh

Total Post:310

Points:1550
Posted by  Arun Singh
 2580  View(s)
Ratings:
Rate this:
  1. Arun Singh

    Post:310

    Points:1550
    How can you select all elements in a page using jQuery?

    To select all elements in a page, we can use all selectors, for that we need to use *(asterisk symbol).
    <script language="javascript" type="text/javascript">

             $("*").css("border", "2px dotted red");

    </script>

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!