Skip to content

Does Not Work With Dynamically Created Elements #5

Description

@metalhaze

If the element if loaded at the same time the DOM is loaded then your script recognizes the element you are targeting and it works.

If you add an element to the DOM dynamically, your script does not recognize the element.

I tried binding 'newHover' to the live() function but it didn't work.

var t3 = $('.touchMe').Hoverable({disableHover:true, logging:true});
t3.live('newHover', function(e, touch){ //hoverIN
$(this).remove(); -- (For testing purposes)
}, function(e, touch){//hoverOut
$tooltip=$(this).find('.tooltip');
$tooltip.hide();
});

Am I missing something??

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions