var activeTab = $('#tabs ul li[name=<%= this.activeTab %>]'); var activeTabIndex = activeTab.length > 0 ? activeTab.index() : 0; $("#tabs").tabs({ selected: activeTabIndex, create: function (e, ui) { alert('create!'); console.log("create!"); }, activate: function (e, ui) { alert('here!'); console.log("test"); } });
The activeTab variable is designed to activate the same tab after POST (it works). The create event fires as expected. But there is no trigger event, and I donβt understand why. I obviously missed something.
I use the following for documentation:
http://api.jqueryui.com/tabs/
Small skeleton tabs div.
<div id="tabs"> <ul> <li name="Admin"><a href="#admin-tab">Admin</a></li> </ul> </div>
source share