在jQuery UI标签中设置默认标签

前端之家收集整理的这篇文章主要介绍了在jQuery UI标签中设置默认标签前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我有一个每月日历只有基本的HTML表,每个月在一个jQuery UI选项卡选项卡。如何更改默认加载的jQuery UI选项卡?我想在导航中保持月份顺序,但在页面加载时显示当前月份。

解决方法

更新

自从我原来的答案和jQuery 1.9的发布以来,API已经改变。首选方法是使用redreinard’s answer中提到的活动选项。

方法(pre jQuery 1.9)

根据documentation on the JqueryUI Tabs,您可以通过使用可用的选择函数来设置它,如下面的方法所示:

// index will be the index of the tab that you wish to select
$('selector').tabs( "select",index )
$('selector').tabs({ selected: index });
原文链接:https://www.f2er.com/jquery/185245.html

猜你在找的jQuery相关文章