Skip to content

Commit

Permalink
Merge pull request #14 from aimeos/patch-1
Browse files Browse the repository at this point in the history
feat: make compatible with `cash` library
  • Loading branch information
hsynlms authored Jan 15, 2022
2 parents b4ef861 + 656b420 commit bfbad46
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/zeynep.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
!zeynep.hasClass('submenu-opened') && zeynep.addClass('submenu-opened')

// scroll to top before submenu transition
zeynep.scrollTop(0)
zeynep[0].scrollTo({top: 0})

eventController('opened', eventDetails)
})
Expand All @@ -71,11 +71,11 @@

// close subMenu
subMenuEl.removeClass('opened current')
zeynep.find('.submenu.opened:last').addClass('current')
zeynep.find('.submenu.opened').last().addClass('current')
!zeynep.find('.submenu.opened').length && zeynep.removeClass('submenu-opened')

// scroll to top between submenu transitions
subMenuEl.scrollTop(0)
subMenuEl[0].scrollTo({top: 0})

eventController('closed', eventDetails)
})
Expand Down Expand Up @@ -184,4 +184,4 @@

return instance
}
})(window.jQuery, 'zeynep')
})(window.jQuery || window.cash, 'zeynep')

0 comments on commit bfbad46

Please sign in to comment.