Touchable-jQuery-Plugin icon indicating copy to clipboard operation
Touchable-jQuery-Plugin copied to clipboard

Does Not Work With Dynamically Created Elements

Open metalhaze opened this issue 14 years ago • 0 comments

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

metalhaze avatar Feb 03 '12 16:02 metalhaze