Quantcast
Channel: User JohnP - Stack Overflow
Viewing all articles
Browse latest Browse all 38

Answer by JohnP for Jquery find is not working

$
0
0
$('.popular_prd').find('.view-content')

This will just return a jQuery object which never evaluates to false

You need to check the length of it

if(!$('.popular_prd').find('.view-content').length) {  //no products.}

Viewing all articles
Browse latest Browse all 38

Latest Images

Trending Articles



Latest Images