I am working on a website in which I want to check whether element has any content in it.
Below is my html code. I have mentioned condition#1 where
i hope the following script will heplful.
jQuery(function ($) { if ($(".featured-block__title").text().length != 0 && jQuery('.featured-block__tag').text().length != 0 ) { $(".img-fit img").addClass("opacity-pointseven"); // For condition#1 } });