Skip to content

Commit

Permalink
[BUGFIX] hovering on dropdownColumns before js has loaded will invert…
Browse files Browse the repository at this point in the history
… the toggle-effect (#510)
  • Loading branch information
pxamike authored and dmh committed Apr 15, 2019
1 parent a7142b3 commit bb66922
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
6 changes: 4 additions & 2 deletions Resources/Public/css/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ jQuery(function ($) {
var $dropdownMenuWithColumns = $('.js__dropdown-menu-with-columns .js__main-navigation__item._sub')

if (!touchSupport) {
$dropdownMenuWithColumns.hover(function () {
$(this).toggleClass('open')
$dropdownMenuWithColumns.mouseenter(function () {
$(this).addClass('open')
}).mouseleave(function () {
$(this).removeClass('open')
})
}

Expand Down
6 changes: 4 additions & 2 deletions Resources/Public/less/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ jQuery(function ($) {
var $dropdownMenuWithColumns = $('.js__dropdown-menu-with-columns .js__main-navigation__item._sub')

if (!touchSupport) {
$dropdownMenuWithColumns.hover(function () {
$(this).toggleClass('open')
$dropdownMenuWithColumns.mouseenter(function () {
$(this).addClass('open')
}).mouseleave(function () {
$(this).removeClass('open')
})
}

Expand Down
6 changes: 4 additions & 2 deletions felayout_t3kit/dev/js/main/header/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ jQuery(function ($) {
var $dropdownMenuWithColumns = $('.js__dropdown-menu-with-columns .js__main-navigation__item._sub')

if (!touchSupport) {
$dropdownMenuWithColumns.hover(function () {
$(this).toggleClass('open')
$dropdownMenuWithColumns.mouseenter(function () {
$(this).addClass('open')
}).mouseleave(function () {
$(this).removeClass('open')
})
}

Expand Down

0 comments on commit bb66922

Please sign in to comment.