2012-02-27 57 views
1

我正在使用asp.net菜单控件,但我需要添加一个滑块,以便如果菜单控件生长在可见页面外,然后限制它,并使用jquery滑块来查看其他选项隐藏。我已经尝试Jcarousel,现在这一个,但已能够正确实施这一点。发生2件事:asp.net菜单与滑块

  1. 项目被隐藏,无论我点击它什么都不显示它们。
  2. 子菜单不再出现。

任何帮助或指导更好的插件,我可以使用我真的很感激它。

<link href="css/jquery.thumbnailScroller.css" rel="stylesheet" /> 
    <!-- Add jQuery library --> 
    <script type="text/javascript" src="js/jquery-1.7.1.min.js"></script> 
    <!-- jquery ui custom build (for animation easing) --> 
    <script src="js/jquery-ui-1.8.13.custom.min.js"></script> 
    <script> 
     /* jQuery.noConflict() for using the plugin along with other libraries. 
     You can remove it if you won't use other libraries (e.g. prototype, scriptaculous etc.) or 
     if you include jQuery before other libraries in yourdocument's head tag. 
     [more info: http://docs.jquery.com/Using_jQuery_with_Other_Libraries] */ 
     /* calling thumbnailScroller function with options as parameters */ 
     (function ($) { 

      window.onload = function() { 

       $("#tS2").thumbnailScroller({ 
        scrollerType: "clickButtons", 
        scrollerOrientation: "horizontal", 
        scrollSpeed: 2, 
        scrollEasing: "easeOutCirc", 
        scrollEasingAmount: 600, 
        acceleration: 4, 
        scrollSpeed: 800, 
        noScrollCenterSpace: 10, 
        autoScrolling: 0, 
        autoScrollingSpeed: 2000, 
        autoScrollingEasing: "easeInOutQuad", 
        autoScrollingDelay: 500 
       }); 
      } 
     }); 
    </script> 
    <!-- thumbnailScroller script --> 
    <script src="js/jquery.thumbnailScroller.js"></script> 


    <div id="tS2" class="jThumbnailScroller"> 
     <div class="jTscrollerContainer"> 
      <div class="jTscroller">  
       <asp:Menu ID="navigation" runat="server" Orientation="Horizontal" CssClass="topmenu" MaximumDynamicDisplayLevels="20" 
        IncludeStyleBlock="false"> 
        <DynamicSelectedStyle /> 
        <DynamicMenuItemStyle /> 
        <DynamicHoverStyle /> 
        <DynamicMenuStyle /> 
        <StaticMenuItemStyle /> 
        <StaticSelectedStyle /> 
        <StaticHoverStyle /> 
       </asp:Menu> 
      </div> 
     </div> 
     <a href="#" class="jTscrollerPrevButton"></a> 
     <a href="#" class="jTscrollerNextButton"></a> 
    </div> 
+0

试用这种平板电脑或智能手机的导航设计。你可能想重新考虑你的设计。 – jfrankcarr 2012-02-27 19:20:43

+0

其不适用于平板电脑或移动我们得到它将有一个完全不同的布局 – Andres 2012-02-27 20:03:42

回答

0

它看起来像你缺少你的匿名包装函数的后缀(),所以window.onload块永远不会执行。

您是否在控制台中发现任何错误?

+0

多数民众赞成我从插件和奇怪的薄代码是我没有得到一个错误BC有非菜单项不适合是只是在第二行 – Andres 2012-02-27 20:05:16

+0

*不适合刚刚通过第二行 – Andres 2012-02-27 20:49:03