jq 基础
- JScript code
<script type="text/javascript"> $(function () { $("#tabs").tabs({ event: 'mouseover' }); $("#categoryTree").treeview({ collapsed: true }); });</script>问题:
1.("#tabs") 是一个DIV ,.tabs({ event: 'mouseover' }) 这一段是什么意思?
2.treeview({ collapsed: true }); 这一段是什么意思?
谢谢
- HTML code
<div id="navbar"> <div class="banner"> <div class="tabbar"> <div class="tabs"> @{var ctrl = ViewContext.Controller; string action = (string)ViewContext.RouteData.Values["Action"];} @Html.ActionLink("首页", "Index", "Home", null, (ctrl is HomeController) ? new { @class = "actived" } : null) @Html.ActionLink("栏目1", "Index", "Video", new { id = "pubdate" }, (ctrl is VideoController && (!new[] { "HotVideos", "Search", "Upload" }.Contains(action))) ? new { @class = "actived" } : null) @Html.RouteLink("栏目2", "Paging", new { action = "Index", controller = "Album", id = "0" }, (ctrl is AlbumController) ? new { @class = "actived" } : null) @Html.ActionLink("栏目3", "HotVideos", "Video", new { id = "" }, (ctrl is VideoController && action == "HotVideos") ? new { @class = "actived" } : null) @Html.ActionLink("栏目4", "Search", "Video", null, (ctrl is VideoController && action == "Search") ? new { @class = "actived" } : null) @Html.ActionLink("栏目5", "Index", "Admin", null, (ctrl is AccountController || ctrl is AdminController) ? new { @class = "actived" } : null) </div> </div> <div id="dvAccountInfo"> </div> </div> <div class="bar"> </div> </div>[解决办法]
1,给每个tab绑定onmouseover事件,鼠标滑过切换选项卡
2,设置categoryTree的treeview折叠状态为关闭
[解决办法]
应该倒入了easyui或者其他基于jq的插件了,自己找这个插件的api来看