Checking if a div exists is fairly simple
if(document.getif(document.getElementById(\'if\')){ }
But how can I check if a div with the give
I do below and check if id exist and execute function if exist.
id
var divIDVar = $('#divID').length; if (divIDVar === 0){ console.log('No DIV Exist'); } else{ FNCsomefunction(); }