jQuery Miscellaneous toArray () method
Examples
The <li> elements into an array, then the output of the array element innerHTML:
$("button").click(function(){
x=$("li").toArray()
for (i=0;i<x.length;i++)
{
alert(x[i].innerHTML);
}
});
x=$("li").toArray()
for (i=0;i<x.length;i++)
{
alert(x[i].innerHTML);
}
});
try it"
Definition and Usage
toArray () method returns an array of jQuery selectors match elements.
grammar
$(selector).toArray()