Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does Not Work With Dynamically Created Elements #5

Open
metalhaze opened this issue Feb 3, 2012 · 0 comments
Open

Does Not Work With Dynamically Created Elements #5

metalhaze opened this issue Feb 3, 2012 · 0 comments

Comments

@metalhaze
Copy link

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??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant