Could someone help me with removing the parent div if the href attribute is empty? Here's the code I tried, but it doesn't seem to be working as expected. Any suggestions?
$("#cs-gallery .et_pb_module_inner .dnext_thumbs_gallery_top_holder .dnext-thumbs-gallery-top .dnext-thumbs-gallery-active .dnxte_thumbs_gallery_child .dnext-thumbs-gallery-item a").filter(function () {
return this.attr('href').length == 0;
}).remove();