使用URL中的参数选择jQuery Tab [英] Selecting a jQuery Tab using a parameter in the URL

查看:177
本文介绍了使用URL中的参数选择jQuery Tab的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在调查用提供的标签替换 Struts 1标签库提供的标签通过jQuery UI.我已经成功地将选项卡与现有应用程序集成在一起,但是我在如何使用传入URL上的参数myurl.com/action.do?selectedTab=SecondTab设置所选选项卡上苦苦挣扎.

I am currently investigating replacing the tabs provided by a Struts 1 tag library with the tabs provided by jQuery UI. I have successfully managed to get the tabs integrated with the existing application but I am struggling on how to set the selected tab using a parameter on the incoming URL, that is myurl.com/action.do?selectedTab=SecondTab.

我是JavaScript和jQuery的新手;有什么关于从哪里开始的指针?

I am a newcomer to JavaScript and jQuery; what are some pointers on where to start?

推荐答案

使用来自文档:

#select

签名:

.tabs( 'select' , [index] )

选择一个选项卡,就像单击它一样.第二个参数是要选择的选项卡的从零开始的索引,或者是与该选项卡关联的面板的ID选择器(选项卡的href片段标识符,例如哈希,指向面板的ID).

Select a tab, as if it were clicked. The second argument is the zero-based index of the tab to be selected or the id selector of the panel the tab is associated with (the tab's href fragment identifier, e.g. hash, points to the panel's id).

这篇关于使用URL中的参数选择jQuery Tab的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆