简体   繁体   English

jQuery-UI选项卡在某些页面上不起作用

[英]jQuery-UI tabs not working on some pages

I have a site set up in Wordpress, and using the same template on two pages, one of the jQuery-UI tabs work and the other doesnt. 我在Wordpress中建立了一个站点,并在两个页面上使用了相同的模板,其中一个jQuery-UI选项卡有效,而另一个则不起作用。 Can anybody help me debug and find out where the second page have a conflict? 有人可以帮我调试并找出第二页有冲突的地方吗?

Working: http://solstad.no/investor-relations/general-meetings/ 工作: http//solstad.no/investor-relations/general-meetings/

Not Working: http://solstad.no/investor-relations/financial-reports/ 不起作用: http : //solstad.no/investor-relations/financial-reports/

Thanks a lot! 非常感谢!

Add data-toggle="tab" to the tabs in the 2nd link and it should work. data-toggle="tab"添加到第二个链接中的标签中,它应该可以工作。

See screenshot - 查看屏幕截图-

在此处输入图片说明

Since, it's a Wordpress site, I'm not sure if you're calling the jQuery UI javascript correctly or implementing the tabs the right way. 因为这是一个Wordpress网站,所以我不确定您是在正确调用jQuery UI javascript还是以正确的方式实现选项卡。 But adding the following script anywhere below that tab content should work / hot-fix it. 但是,在该标签内容下方的任何位置添加以下脚本应该可以工作/对其进行热修复。

<script type="text/javascript">
    $('.nav-tabs li a').attr('data-toggle', 'tab');
</script>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM