jQuery   发布时间:2022-03-30  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了Jquery UI – 选项卡响应大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我对 jquery ui标签一个奇怪的问题.

这是代码

<div class="ym-gBox">
    <script>
    $(function() {
        $( "#tabs" ).tabs();
    });
    </script>
            <h1>Versions Übersicht</h1>
    <br />
    <div id="tabs">
        <ul>
            <li><a href="#tabs-1">System Kern</a></li>
            <li><a href="#tabs-2">Anwendungen</a></li>
            <li><a href="#tabs-3">Bibliotheken</a></li>
        </ul>
        <div id="tabs-1">
            <table width="100%" border="0" cellpadding="0" cellspacing="0" class="bordertable">
<tr><th>Name</th><td>System Kern</td></tr>
<tr><th>Version</th><td>1.0.0 </td></tr>
<tr><th>Beschreibung</th><td></td></tr><tr><td colspan="2">System Kern</td></tr>
<tr><th>Webseite</th><td>http://www.dsws.biz</td></tr>
<tr><th>Lizenz</th><td>Dark Star Web Services Source Lizenz</td></tr>
<tr><th>Autor</th><td>
</td></tr>
</table>
        </div>
        <div id="tabs-2">
            b
        </div>
        <div id="tabs-3">
            c
        </div>
    </div>
  </div>

页面加载后,整个页面将加载到选项卡选项卡中.
我真的不知道为什么会这样.

解决方法

对我来说,这个确切的问题与基本标签有关,并且无法通过Chris想法引用的点击事件来解决.如果您的网址被重写为具有完整的绝对网址,例如,也可能发生这种情况.通过缓存工具或.htaccess

因此,如果您的标签被重写为< a href =“http://example.com/page/#tab1”> tabname< / a>

然后解决方案是在初始化选项卡之前删除完整的URL.以下(扩展以保持简单),删除导致#的所有内容

jQuery("#mytabs ul li a").each(function () {
    var current = jQuery(this).attr("href");
    var n = current.indexOf("#");
    jQuery(this).attr("href",current.substr(n));
});

jQuery("#mytabs").tabs( .. )

大佬总结

以上是大佬教程为你收集整理的Jquery UI – 选项卡响应全部内容,希望文章能够帮你解决Jquery UI – 选项卡响应所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
标签:ui