Suppose it is a div with id “slots” then in jquery:
if( $(“#slots”).length < 1 ) {
console.log(“Div is not present”);
}else {
console.log(“Div with id #slots is present”);
}
its is more if we write any div dynamically.
Suppose it is a div with id “slots” then in jquery:
if( $(“#slots”).length < 1 ) {
console.log(“Div is not present”);
}else {
console.log(“Div with id #slots is present”);
}
its is more if we write any div dynamically.