I have following .each jQuery loop.
$('.category').each(function(index) {
if( $('.category > span').parent().next('h2') ) {
// get currently looped element which follows the condition
}
});
How to get currently looped element through .each inside the if statement?
Use:
Example:
Note that you could also get DOM object instead of jQuery object by using
thiskeyword.