Android上的Bootstrap 3 - 菜单下拉列表打开链接而不是下拉列表

时间:2014-03-12 23:38:31

标签: javascript php android jquery twitter-bootstrap-3

我在Wordpress上使用Bootstrap 3,并尝试挤压额外的下拉级别。我想我读过它默认只支持两个级别。我在桌面和IOS设备上工作,但在Android设备上,您无法访问最后一个下拉项目,因为它会打开其父页面。

Android devices open Students instead of the menu below

这是网站...... http://cslc2012.ca/

我尝试过使用类似的东西,但我真的不太了解javascript:

 <script>
 $('.navbar-nav .open .dropdown-menu > li > a').click(function(e) {
     e.preventDefault();
    window.location.href = $(this).attr('href');
 })
    </script>

我正在使用bootstrap navwalker进行wordpress:https://github.com/twittem/wp-bootstrap-navwalker/blob/master/wp_bootstrap_navwalker.php

在navwalker中,它说:

    // If item has_children add atts to a.
            if ( $args->has_children && $depth === 0 ) {
                $atts['href']           = '#';
                $atts['data-toggle']    = 'dropdown';
                $atts['class']          = 'dropdown-toggle';
                $atts['aria-haspopup']  = 'true';
            } else {
                $atts['href'] = ! empty( $item->url ) ? $item->url : '';
            }

你认为这样做会......深度不是0 ......它正在重置其他链接#

由于

0 个答案:

没有答案