I am trying to simply find the next element in my $.each array :
$.each($(".datenumber"), function(idx, item){
alert( item[idx + 1] );
});
But this returns undefined for all the instances. If I just find item with no idx call, it calls the item properly.
Then if I do this :
$.each($(".datenumber"), function(idx, item){
alert( $(item[idx + 1]) );
});
It’s always an object even for the last object which should return a null object since nothing would be after the last item. Also, none of these objects returns have any value or anything in them..
What am I doing wrong?
Or better yet, cache it: