Commit 2c9259a0 by halweg

fix : 修复顶部css抖动问题

parent 00b21f65
...@@ -180,7 +180,7 @@ class Topmenu extends JoshineMenu ...@@ -180,7 +180,7 @@ class Topmenu extends JoshineMenu
$json = json_decode($badge, true); $json = json_decode($badge, true);
$class = $json['class']; $class = $json['class'];
$text = $json['text']; $text = $json['text'];
return "<span class='{$class}'>".$this->escapeHtml($text) .'</span>'; return "<span class='{$class} menu-badge joshine-hidden'>".$this->escapeHtml($text) .'</span>';
} }
protected function _addSubMenu($child, $childLevel, $childrenWrapClass, $limit) protected function _addSubMenu($child, $childLevel, $childrenWrapClass, $limit)
......
...@@ -31,7 +31,6 @@ define([ ...@@ -31,7 +31,6 @@ define([
_create: function () { _create: function () {
var self = this; var self = this;
this.delay = this.options.delay; this.delay = this.options.delay;
var position = $(window).scrollTop(); var position = $(window).scrollTop();
...@@ -67,6 +66,10 @@ define([ ...@@ -67,6 +66,10 @@ define([
$(window).on('resize', function () { $(window).on('resize', function () {
self.element.find('.submenu-reverse').removeClass('submenu-reverse'); self.element.find('.submenu-reverse').removeClass('submenu-reverse');
}); });
$(".menu-badge").each(function(index,element){
$(element).removeClass('joshine-hidden');
});
}, },
/** /**
......
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