I can not put a condition. I need to determine if the HTML code contains an element with the class ".someclass". How to do it?

Something like this:

if(!$(".someclass"))alert("Is Not DOM element"); 

    1 answer 1

     if(!$(".someclass").length)alert("Is Not DOM element"); 

    note: