javascript - Is there a JQuery event to determine when an element's list of children has changed? -
i'm hoping find jquery event tell me when element collection has grown or shrunk after addition/removal of child element.
you can count child elements use conditional statement check whether count changed.
<div> <span></span> <span></span> <span></span> <span></span> <span></span> </div> alert($('div').children().length);
Comments
Post a Comment