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

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 37

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>