Commit 0dcb2312 by 王东红

fix

parent e308c5b6
......@@ -504,6 +504,7 @@ define([
var categoryParent, html;
$(this.element).off('click mousedown mouseenter mouseleave');
this._on({
/**
......@@ -557,7 +558,7 @@ define([
/**
* @param {jQuery.Event} event
*/
'mouseenter .ui-menu-item': function (event) {
'mouseenter .level0.ui-menu-item': function (event) {
var target = $(event.currentTarget),
submenu = this.options.menus,
ulElement,
......@@ -566,9 +567,10 @@ define([
targetPageX,
rightBound;
if (target.has("div.submenu")) {
var dropdown = target.find("div.submenu");
var dropdown = target.find("div.submenu");
if (this.breezeTimeout) {
clearTimeout(this.breezeTimeout);
delete this.breezeTimeout;
......@@ -581,10 +583,11 @@ define([
/**
* @param {jQuery.Event} event
*/
'mouseleave .ui-menu-item': function (event) {
'mouseleave .level0.ui-menu-item': function (event) {
var target = $(event.currentTarget)
var dropdown = target.find("div.submenu");
setTimeout(function () {
this.breezeTimeout = setTimeout(function () {
this.close(dropdown);
}.bind(this), 80);
},
......@@ -636,16 +639,21 @@ define([
this._trigger('beforeOpen', {
dropdown: dropdown
});
var self = this
$('div.submenu.shown').each(function () {
if (dropdown.parent('li')[0].className != $(this).parent('li')[0].className) {
self.close($(this));
}
});
dropdown.addClass('shown')
.parent('li')
.addClass('opened');
if (true) {
dropdown.find("ul.subchildmenu").show()
console.log(dropdown.find("ul.subchildmenu"))
if (dropdown.hasClass('subchildmenu')) {
dropdown.find(".subchildmenu").show();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment