I am iterating over DOM elements using each but when the elements are made available inside the .each loop, they will not accept jQuery bind events.
$('#products .page_item').mouseover(function(){
console.log('this works, adding the mouseover to every selected element');
});
$('#products .page_item').each(function(index, element){
element.mouseover(function(){
console.log("this throws 'not a function'");
});
});
How do I make each element available within the .each loop so I can bind events to them?
(I am iterating over the elements in this manner so I can conditionally exclude some of the elements from the bind, FWIW.)