JQuery UI Tabs fires an event that doesn't fire

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> 
+4
source share
1 answer

Determine which version of the jQuery user interface you are using. Since you are using 1.8, you should use show instead. See jQuery UI 1.8 docs .

+9
source

Source: https://habr.com/ru/post/1496249/


All Articles