Possible Duplicate:
How to check if jQuery object exist in array?
is there any way to determine if a dom element is in an array of dom elements?
i.e.
$(".container img").each(function(){
views.push($(this).clone());
});
creates an array of cloned image elements. I now want to check if a new image element is in that array?
Thanks
or check How to check if jQuery object exist in array? for other solutions.
For your use check out http://jsfiddle.net/hxAg4/34