Skip to content

Commit

Permalink
[-] FO : Correct topmenu scrolling issue on touch devices #PNM-2943
Browse files Browse the repository at this point in the history
  • Loading branch information
tchauviere committed Oct 29, 2014
1 parent e5d5d7e commit 3d0c59b
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -81,14 +81,14 @@ function mobileInit()
categoryMenu.superfish('destroy');
$('.sf-menu').removeAttr('style');

mCategoryGrover.on('click touchstart', function(e){
mCategoryGrover.on('click', function(e){
$(this).toggleClass('active').parent().find('ul.menu-content').stop().slideToggle('medium');
return false;
});

$('.sf-menu > li > ul').addClass('menu-mobile clearfix').parent().prepend('<span class="menu-mobile-grover"></span>');

$(".sf-menu .menu-mobile-grover").on('click touchstart', function(e){
$(".sf-menu .menu-mobile-grover").on('click', function(e){
var catSubUl = $(this).next().next('.menu-mobile');
if (catSubUl.is(':hidden'))
{
Expand All @@ -104,7 +104,7 @@ function mobileInit()
});


$('#block_top_menu > ul:first > li > a').on('click touchstart', function(e){
$('#block_top_menu > ul:first > li > a').on('click', function(e){
var parentOffset = $(this).prev().offset();
var relX = parentOffset.left - e.pageX;
if ($(this).parent('li').find('ul').length && relX >= 0 && relX <= 20)
Expand Down

0 comments on commit 3d0c59b

Please sign in to comment.