Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/71.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何在JQuery Mobile中显示菜单顶部的嵌套子菜单?_Javascript_Jquery_Html_Css_Jquery Mobile - Fatal编程技术网

Javascript 如何在JQuery Mobile中显示菜单顶部的嵌套子菜单?

Javascript 如何在JQuery Mobile中显示菜单顶部的嵌套子菜单?,javascript,jquery,html,css,jquery-mobile,Javascript,Jquery,Html,Css,Jquery Mobile,我正在使用JQuery移动导航栏。我希望子菜单显示在相应菜单的顶部,而不是下方。下面的代码显示子菜单“test1”和“test2”显示在“Less”下面,但我希望它们显示在它上面。这可能吗 <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="

我正在使用JQuery移动导航栏。我希望子菜单显示在相应菜单的顶部,而不是下方。下面的代码显示子菜单“test1”和“test2”显示在“Less”下面,但我希望它们显示在它上面。这可能吗

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.1/jquery.mobile-1.4.1.min.css">
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.1/jquery.mobile-1.4.1.min.js"></script>
</head>
<body>

<div data-role="page" id="pageone">
  <div data-role="header">
    <h1>Welcome To My Homepage</h1>
  </div>

  <div data-role="main" class="ui-content">
    <div data-role="navbar">
      <ul>
           <li><a href="#" data-icon="plus">More</a></li>
           <li><a href="#" data-icon="minus">Less</a>
             <ul>
               <li><a href="#" data-icon="minus">Test 1</a>
             </ul>
             <ul>
               <li><a href="#" data-icon="minus">Test 2</a>
             </ul>
           </li>

      </ul>

    </div>

  </div>

</div> 

</body>
</html>

欢迎来到我的主页

您是否也可以发布一张效果理想的图片?谢谢您的评论。我希望它们位于新上传图片中显示的“更少”按钮上方答案如下: