修复论坛空白输入,上传文件未完成
This commit is contained in:
51
WebRoot/js/menu_min.js
Normal file
51
WebRoot/js/menu_min.js
Normal file
@@ -0,0 +1,51 @@
|
||||
(function($) {
|
||||
$.fn.menu = function(b) {
|
||||
var c,
|
||||
item,
|
||||
httpAdress;
|
||||
b = jQuery.extend({
|
||||
Speed: 220,
|
||||
autostart: 1,
|
||||
autohide: 1
|
||||
},
|
||||
b);
|
||||
c = $(this);
|
||||
item = c.children("ul").parent("li").children("a");
|
||||
httpAdress = window.location;
|
||||
item.addClass("inactive");
|
||||
function _item() {
|
||||
var a = $(this);
|
||||
if (b.autohide) {
|
||||
a.parent().parent().find(".active").parent("li").children("ul").slideUp(b.Speed / 1.2,
|
||||
function() {
|
||||
$(this).parent("li").children("a").removeAttr("class");
|
||||
$(this).parent("li").children("a").attr("class", "inactive")
|
||||
})
|
||||
}
|
||||
if (a.attr("class") == "inactive") {
|
||||
a.parent("li").children("ul").slideDown(b.Speed,
|
||||
function() {
|
||||
a.removeAttr("class");
|
||||
a.addClass("active")
|
||||
})
|
||||
}
|
||||
if (a.attr("class") == "active") {
|
||||
a.removeAttr("class");
|
||||
a.addClass("inactive");
|
||||
a.parent("li").children("ul").slideUp(b.Speed)
|
||||
}
|
||||
}
|
||||
item.unbind('click').click(_item);
|
||||
if (b.autostart) {
|
||||
c.children("a").each(function() {
|
||||
if (this.href == httpAdress) {
|
||||
$(this).parent("li").parent("ul").slideDown(b.Speed,
|
||||
function() {
|
||||
$(this).parent("li").children(".inactive").removeAttr("class");
|
||||
$(this).parent("li").children("a").addClass("active")
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})(jQuery);
|
||||
Reference in New Issue
Block a user