html - Adding tooltips to jQuery dynamically created elements -
i found helpful jsfiddle on adding tooltips jquery.
how same results dynamically created elements?
without plugins, if thtas possible.
depending on options user ticks, div display 1 of 3 coloured circles show importance of task. can add tooltip circles in manner such this?
jquery(function() { jquery( '.veryimportant' ).tooltip(); });
you add tooltip how would, make sure calling .tooltip()
after element has been added page. based on code, seems you're trying add immediately, , if element doesn't exist, never it.
simple sample:
<div id='test'>im div</div> $("#test").append("<span id='spantest'>hey</span>"); $("#spantest").tooltip(); //works fine, since element exists @ time of call
Comments
Post a Comment