Calling an event after a jquery tab load

ContextSwitch picture ContextSwitch · Apr 8, 2012 · Viewed 17.7k times · Source

I'm using jQuery tabs. In one of the tabs is a wysiwyg editor that needs to be refreshed after the tab is displayed, but I can't figure out if there is an event that fires after the tab is loaded.

From my understanding, the load event is only for tabs that use ajax calls. I've tried using it but it doesn't fire: jQuery ui tabs load/tabsload event does not fire

In that example they use an iframe, which has a load event that is triggered. I'm just using divs, which don't have a load event, and nothing like an onshow event listener.

The closest I've been able to get is the tabsselect event which fires when a tab is clicked, but before the new tab is loaded.

Is there any event that fires after the tab is loaded when I'm not using ajax?

Thanks

Answer

Rodik picture Rodik · Apr 8, 2012

Did you try event-show? http://jqueryui.com/demos/tabs/#event-show

$( ".selector" ).tabs({
   show: function(event, ui) { ... }
});