Have to click the main menu links twice (news2 template) before they work.
How do I fix this?
http://www.derbyalcohol.org.uk/
// fix for the iOS devices
/* jshint ignore:start */
jQuery('#gkExtraMenu ul li span').each(function(i, el) {
el.attr('onmouseover', '');
});
/* jshint ignore:end */
jQuery('#gkExtraMenu ul li a').each(function(i, el) {
el = jQuery(el);
el.attr('onmouseover', '');
if(el.parent().hasClass('haschild') && jQuery(document.body).attr('data-tablet') !== null) {
el.click(function(e) {
if(el.attr("dblclick") === undefined) {
e.preventDefault();
e.stopPropagation();
el.attr("dblclick", new Date().getTime());
} else {
if(el.parent().find('div.childcontent').eq(0).css('overflow') == 'visible') {
window.location = el.attr('href');
}
var now = new Date().getTime();
if(now - el.attr("dblclick", 0) < 500) {
window.location = el.attr('href');
} else {
e.preventDefault();
e.stopPropagation();
el.attr("dblclick", new Date().getTime());
}
}
});
}
});
dziudek wrote:Now I see the reason of my problems with detecting the issue - the problem is only with links on the first level - I've clicked the submenu items. You can temporary fix the problem by removing the following fragment from the js/gk.menu.js file:
- Code: Select all
// fix for the iOS devices
/* jshint ignore:start */
jQuery('#gkExtraMenu ul li span').each(function(i, el) {
el.attr('onmouseover', '');
});
/* jshint ignore:end */
jQuery('#gkExtraMenu ul li a').each(function(i, el) {
el = jQuery(el);
el.attr('onmouseover', '');
if(el.parent().hasClass('haschild') && jQuery(document.body).attr('data-tablet') !== null) {
el.click(function(e) {
if(el.attr("dblclick") === undefined) {
e.preventDefault();
e.stopPropagation();
el.attr("dblclick", new Date().getTime());
} else {
if(el.parent().find('div.childcontent').eq(0).css('overflow') == 'visible') {
window.location = el.attr('href');
}
var now = new Date().getTime();
if(now - el.attr("dblclick", 0) < 500) {
window.location = el.attr('href');
} else {
e.preventDefault();
e.stopPropagation();
el.attr("dblclick", new Date().getTime());
}
}
});
}
});