adsense

Wednesday, December 28, 2016

Jquery function to identify DIVs without text

You can use jQuery filter function to identify all the DIVs without text as displayed below.

$('.heading').filter(function(i,src){
    return $.trim($(src).text()).length == 0;
}).css('cursor', "pointer");

 

Cheers
Samitha

No comments:

Post a Comment