Home › Forums › Basel support forum › Menu on touch devices like iPad › Reply To: Menu on touch devices like iPad
October 14, 2017 at 4:06 pm
#21678
Artem Temos
Keymaster
Now we got it. Try to replace the code with this one
jQuery(document).ready(function() {
jQuery('.menu-item').on('click', '> a', function() {
if(jQuery(this).parent().hasClass('item-menu-opened'))
window.location.href = jQuery(this).attr('href');
})
var menuForIPad = function() {
mainMenu = jQuery('.basel-navigation').find('ul.menu'),
if( jQuery(window).width() <= 1366 ) {
mainMenu.find(' > .item-event-hover').each(function() {
jQuery(this).data('original-event', 'hover').removeClass('item-event-hover').addClass('item-event-click');
});
} else {
mainMenu.find(' > .item-event-click').each(function() {
if( jQuery(this).data('original-event') == 'hover' ) {
jQuery(this).removeClass('item-event-click').addClass('item-event-hover');
}
});
}
};
jQuery(window).on('resize', menuForIPad);
});