Answers for "how to find if element exists jquery"

22

jquery check if element exists

// Check if an element currently exists
if ($('#element').length) {

}
Posted by: Guest on June-05-2020
0

jquery if element appears

setInterval(function() {
    $('.my-element-class:not(.appeared)')
        .addClass('appeared')
        .each(function() {
            console.log("here I am!")
        });
}, 250);
Posted by: Guest on August-03-2021

Code answers related to "how to find if element exists jquery"

Code answers related to "Javascript"

Browse Popular Code Answers by Language