简体   繁体   中英

Sharepoint 2010 dropdown menu on mobile

I have a hovering dropdown menu in Sharepoint 2010 that works fine with a mouse, but what I'm also trying to achieve is getting the menu to not reload the page on a mobile device (since the user has to click on menu dropdown) and act more like a onHover , I tried removing the href for the menu but that didn't do anything. I also compared my app to others made with sharepoint that work well on mobile, and i can't really see what they are doing different

is it some kind of css I'm missing? if you've run into this before I'd really appreciate your help.

here are the properties set in the asp menu:

<SharePoint:AspMenu
  ID="TopNavigationMenuV4"
  Runat="server"
  EnableViewState="false"
  DataSourceID="topSiteMap"
  AccessKey="<%$Resources:wss,navigation_accesskey%>"
  UseSimpleRendering="true"
  UseSeparateCss="false"
  Orientation="Horizontal"
  StaticDisplayLevels="1"
  MaximumDynamicDisplayLevels="2"
  SkipLinkText=""
  CssClass="s4-tn"/>

and this is the html that is generated when i view the source:

 <li class="static dynamic-children selected"><br>
 <a class="static dynamic-children selected menu-item" title="Home" href="/sites/Test/Pages/default.aspx" accesskey="1">
 <span class="additional-background"><br>
 <span class="menu-item-text"><br>
 Test <br>
 </span>

Your question is not really obvious. But i can tell you this. If you don't want anything to happen you can use

onclick="return false;"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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