我想尝试我的浮动菜单asp.net

时间:2014-11-28 06:00:26

标签: javascript jquery asp.net ajax

我有一个可以使用的浮动菜单,但我的问题是当我点击菜单中的任何链接时,它会重定向到请求的数据并且菜单消失。一个想法如何ajax我的菜单,使其保持在页面上。我正在使用ASP.Net



 

   <script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.7.1.min.js"></script>
    <script type="text/javascript" src="scriptFloatingMenu.js"></script>
    <script type="text/javascript" src="/Scripts/floating-1.12.js"></script>

<div class="container body-content">
    <div class="box" style="position:relative; float:left; width:100px; min-height:1300px">
        <div id="floatdiv" class="box" style="position: relative; width: 96px; height: 120px">
            <h3>Genres</h3>
            <ul id="vertical" class="clearfix">
               
                @foreach (var genre in Model)
                {
                    <li id="clickme">
                        @Html.ActionLink(genre.Name, "Browse", "Store", new { Genre = genre.Name }, null)
                    </li>
                }
              
            </ul>
        </div>
    </div>
</div>

<script type="text/javascript">
    floatingMenu.add('floatdiv',
        {
            // Represents distance from top or
            // bottom browser window border
            // depending upon property used.
            // Only one should be specified.
            targetTop: 10,
            // targetBottom: 0,
            // prohibits movement on x-axis
            prohibitXMovement: true,
            // Remove this one if you don't
            // want snap effect
            snap: true
        });
</script> 
&#13;
&#13;
&#13;

0 个答案:

没有答案