From cdaf014be390be8e0591608290fdde0bc0279373 Mon Sep 17 00:00:00 2001 From: Danilo Spinelli Date: Tue, 23 May 2017 13:42:33 +0200 Subject: [PATCH] fix megamenu js --- src/components/megamenu/index.js | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/components/megamenu/index.js b/src/components/megamenu/index.js index c2f3c7dd1..72ea7443f 100644 --- a/src/components/megamenu/index.js +++ b/src/components/megamenu/index.js @@ -118,22 +118,12 @@ $(document).ready(function() { }) $('.' + opts.topNavItemClass + ' > a').each((i, el) => { - const $target = $(el).parent().find('.' + opts.panelClass) + const $target = $(el).parent() + .find('.' + opts.panelClass) + .not(el) if (el && $target.length > 0) { new Popper(el, $target, { - // onUpdate: (data) => { - // const $el = $(data.instance.popper) - // if ($el.offset().left + $el.outerWidth() > $(window).width()) { - // $el.css({ width: '95%' }) - // } - // }, - // onCreate: (data) => { - // const $el = $(data.instance.popper) - // if ($el.offset().left + $el.outerWidth() > $(window).width()) { - // $el.css({ width: '95%' }) - // } - // }, placement: 'bottom', modifiers: { arrow: {