How to apply the plugin in live mode

Is there a way to apply the plugin to an element in live mode, just as we can attach a handler that will survive ajax calls? Right now we have some code that uses the โ€œcluetipโ€ in the grid glad, but after ajax it crashes.

$('a.clickableSticky').cluetip({ splitTitle: '|', showTitle: false, titleAttribute: 'description', activation: 'click', sticky: true, arrows: true, closePosition: 'title' }); 
+6
jquery cluetip
source share
1 answer

Live only works with events, so you cannot do this with a tooltip.

You can still run cluetip for any newly created items.

So...

 $('#grid').live('gridRefreshEvent', function () { $('#grid').find('a.clickableSticky').cluetip({ splitTitle: '|', showTitle: false, titleAttribute: 'description', activation: 'click', sticky: true, arrows: true, closePosition: 'title' }); } 

Edit:

If the plugin does not provide an event, you can hack the plugin to create your own event by finding the ajax function in your code and adding: $('#grid').trigger('gridRefreshEvent'); somewhere.

You can also ask RadGrid support for the event. Any non-dumb developer would add basic things like this.

+1
source share

All Articles