Showing posts with label get all empty DIVs. Show all posts
Showing posts with label get all empty DIVs. Show all posts

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