带滑块的asp.net菜单

时间:2012-02-27 19:11:15

标签: c# jquery asp.net menu jquery-ui-slider

我正在使用asp.net菜单控件,但我需要添加一个滑块,所以如果菜单控件增长到可见页面之外,那么这会限制它并使用jquery滑块查看隐藏的其他选项。我已经尝试了Jcarousel,现在这个但是能够正确实现这个。发生了两件事:

  1. 项目被隐藏,无论我点击它都不会显示它们。
  2. 子菜单不再出现。
  3. 对于我可以使用的更好的插件的任何帮助或指导我会非常感激。

        <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>
    

1 个答案:

答案 0 :(得分:0)

看起来您在匿名包装函数上缺少后缀(),因此window.onload块不会执行。

您是否在控制台中收到任何错误?