Answers for "jquery check if element exists in parent"

1

jquery if has parent

if ($(this).parents('.last').length) {
    // element has an ancestor element with the class "last"
}
Posted by: Guest on January-27-2021

Code answers related to "jquery check if element exists in parent"

Code answers related to "Javascript"

Browse Popular Code Answers by Language