Javascript jQuery UI选项卡在触摸设备上不工作(使用touchPunch)

Javascript jQuery UI选项卡在触摸设备上不工作(使用touchPunch),javascript,jquery,touch,Javascript,Jquery,Touch,我试图在touchPunch旁边实现jQueryUI选项卡,以便将点击映射到触摸事件。但是,触摸设备仍然无法识别触摸,因此标签无法切换 这是我正在使用的脚本: <script type="text/javascript"src="html/jquery-1.10.2.js"></script> <script type="text/javascript" src="html/jquery-ui.js"></script> <script ty

我试图在touchPunch旁边实现jQueryUI选项卡,以便将点击映射到触摸事件。但是,触摸设备仍然无法识别触摸,因此标签无法切换

这是我正在使用的脚本:

<script type="text/javascript"src="html/jquery-1.10.2.js"></script>
<script type="text/javascript" src="html/jquery-ui.js"></script>
<script type ="text/javascript" src="html/jquery.ui.touch-punch.js"></script>

<script language="JavaScript">
    $(function() {
        $( "#tabs" ).tabs({event:'click' ,hide:'fadeOut', show: 'fadeIn'}).addClass( "ui-tabs-vertical ui-helper-clearfix" );
        $( "#tabs li" ).removeClass( "ui-corner-top" ).addClass( "ui-corner-left" );

    });
</script>

$(函数(){
$(“#制表符”).tabs({事件:'click',隐藏:'fadeOut',显示:'fadeIn'}).addClass(“ui制表符垂直ui辅助程序clearfix”);
$(“#tabs li”).removeClass(“ui角顶部”).addClass(“ui角左侧”);
});
我还尝试将事件更改为“touchstart”和“click touchstart”,两者都不起作用(第一个也是禁用click的)

非常感谢您的帮助。谢谢

编辑-这是使用的html代码

<div id="tabs" class="navtext" style="position: fixed; top: 73vh; left: 0.5vw; height: 25vh;">
    <ul style="list-style: none; font-size: 1.5vw">
        <li><a href="#Presets">Presets</a></li><br />
        <li><a href="#Channels">Channels</a></li>
    </ul>
    <div id="Presets">
        <div class="navtext" id="LayoutList"
             style="left: 9vw; height: 20vh;top: 1vh; width: 0; POSITION: absolute; background-color: transparent; overflow-y: scroll; -webkit-overflow-scrolling: touch">
        </div>
    </div>
    <div id="Channels">
        <div class="navtext" id="ChannelList"
             style=" width: 0; top: 1vh; POSITION: absolute; background-color: transparent; overflow-y: scroll; -webkit-overflow-scrolling: touch">
        </div>
    </div>
</div>



我也使用选项卡,虽然我的jquery版本稍高一些,但它在iPad上也能工作。您是否在没有任何参数的情况下尝试了init(不确定单击是否会干扰):$(“#tabs”).tabs({active:0})@Jobst我刚刚试过,但我仍然没有注册任何触摸事件,无论是在我的Nexus 6上还是在我的iPadmy版本的jquery是1.11(在WP主题中运行)上。a)选项卡的html是什么,b)控制台中有没有错误?@Jobst所以我更新到了最新版本(1.11.4),但没有任何效果,控制台显示没有错误。。。编辑-它现在可以在我的iPad上运行,但我的nexus 6仍然不能正常工作,我不知所措-我的标签可以在我所有的触摸设备上运行,但没有触摸穿孔。将标签放在一个带有一些填充和边距的分区内,这样你就可以确保没有其他“东西”阻止你的手指被触摸设备看到。