单击 Yansdesign 选项卡式菜单后加载内容
我用过这个教程: http://yensdesign.com/2008/12 /create-a-smooth-tabbed-menu-in-jquery/
它是 Yansdesign 选项卡式菜单。有人可以告诉我如何更改代码以在单击此选项卡后加载特定选项卡的内容吗?
I've used this tutorial:
http://yensdesign.com/2008/12/create-a-smooth-tabbed-menu-in-jquery/
it is yensdesign tabbed menu. Could sb tell me how do I have to change the code to load content of particular tab after clicking on this tab?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 js 时,您希望将每种情况更改为以下内容:
有负载对此的变化 - 也许您希望在加载内容之前使选项卡处于活动状态,以便立即向用户提供反馈,以防您的服务器需要几秒钟的时间来响应。
此外,tabs.js 文件中的 addClass/removeClass 内容也不能很好地扩展。最好选择所有 div,然后过滤掉您不感兴趣的 div,例如:(
无论如何)
Working with the js, you want to change each case to something like:
There are loads of variations on this - maybe you want to make the tab active before loading the content go give the user immediate feedback in case your server takes a few seconds to respond.
Also, the addClass/removeClass stuff in the
tabs.js
file doesn't scale too well. It'd be better to select all divs, then filter out the ones you're not interested in, e.g.:(something like that anyway)