Javascript examples for jQuery:Array
Create list of jQuery elements as array
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.7.1.js"></script> <script type="text/javascript"> $(window).load(function(){//from w w w . j ava2 s . c o m $(function(){ var arr = new Array($('#el1'),$('#el2'), $('#el3')); console.log( arr.length ); }); }); </script> </head> <body> <div id="el1"> </div> <div id="el2"> </div> <div id="el3"> </div> </body> </html>