I'm using the jQuery plugin PowerTip to show tooltips on hover. I initialize it with $('.tooltip').powerTip()
and this works great on already loaded content, but if I dynamically load <div class="tooltip" data-powertip="Hey">Hey</div>
, I have to run the $('.tooltip').powerTip()
function again, which seems like a waste, especially if I have hundreds of these. Is it possible to do something like this? :
1)
$(document).powerTip('.tooltip', {})
or
2)
$(document).on('mouseover', '.tooltip', function(e) {
$(this).powerTip()
});