Menu with sub menu click twice

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Thu Jun 12, 2014 5:07 am
Reply with quote
Report this post
Using the game template for the following site http://www.binnaburralodge.com.au/draftsite and I've noticed that any menu item on the main menu that contains a sub menu has to be clicked twice to activate the link. Only happens with those items with drop down sub menus (e.g. accommodation, activities, group).

Any help would be appreciated.

Cheers
Emily
User avatar
Junior Boarder

GK User
Thu Jun 12, 2014 6:49 am
Reply with quote
Report this post
In:
/templates/gk_game/js/gk.menu.js
file, please comment out those lines:
Code: Select all
            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());
                        }
                    }
                });
            }
User avatar
Moderator

GK User
Mon Jun 23, 2014 7:36 pm
Reply with quote
Report this post
Hi,
I've deleted the code, but now it doesn't show two columns sub items...I'm not very familiar with js, can you please let me know which part I have to paste it back? ;)
Thank you!!
User avatar
Senior Boarder

GK User
Sat Jun 28, 2014 11:45 am
Reply with quote
Report this post
Hello,

@ladybug.6 - could you attach me your modified gk.menu.js file?
User avatar
Administrator

GK User
Mon Jun 30, 2014 9:12 am
Reply with quote
Report this post
Hello,

I've send it on PM.
User avatar
Senior Boarder

GK User
Tue Jul 01, 2014 8:04 am
Reply with quote
Report this post
You had probably old version of the script - please use the attached one:
User avatar
Administrator

GK User
Mon Jul 07, 2014 12:41 pm
Reply with quote
Report this post
Cool the two columns now work, but there's another problem now. I have blank-white space in sub menus (example: I have 4 sub items, but after these 4 items there's blank - white space below these 4 items).

Help please,
User avatar
Senior Boarder

GK User
Wed Jul 09, 2014 11:20 am
Reply with quote
Report this post
Sorry but I cannot access your website, so I cannot detect a reason of the problem.
User avatar
Administrator

GK User
Wed Jul 23, 2014 3:54 pm
Reply with quote
Report this post
dziudek wrote:You had probably old version of the script - please use the attached one:


Hi Support,

I have same issue here http://91.144.243.222/~dan31234/
Should I update the gk.menu.js.zip?

Thanks
User avatar
Fresh Boarder

GK User
Wed Jul 23, 2014 5:33 pm
Reply with quote
Report this post
The menu file is from the Game template not from Storefront - please just apply the change mentioned by Cyberek.
User avatar
Administrator

GK User
Wed Aug 27, 2014 2:44 pm
Reply with quote
Report this post
dziudek wrote:The menu file is from the Game template not from Storefront - please just apply the change mentioned by Cyberek.


Hi dziudek,
Done, commenting out, but not working on storefront. Anyting else I need to do?
Thanks and greetings from warm Spain ;)


<!-- comment out -->
if(el.parent().hasClass('haschild') && jQuery('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());
}
}
});
}

});
-->
User avatar
Fresh Boarder

GK User
Wed Aug 27, 2014 8:57 pm
Reply with quote
Report this post
You should comment out using /* and */ not <!-- and --> - you have used syntax for the HTML comments not JS.
User avatar
Administrator

GK User
Mon Sep 01, 2014 3:17 pm
Reply with quote
Report this post
dziudek wrote:You should comment out using /* and */ not <!-- and --> - you have used syntax for the HTML comments not JS.


Hey thanks, but not working. :?
User avatar
Fresh Boarder

GK User
Tue Sep 02, 2014 10:54 am
Reply with quote
Report this post
You have commented out too much code - please replace fragment:

Code: Select all
jQuery('#gkExtraMenu ul li a').each(function(i, el) {
            el = jQuery(el);
            el.attr('onmouseover', '');
     

to:

Code: Select all
jQuery('#gkExtraMenu ul li a').each(function(i, el) {
            el = jQuery(el);
            el.attr('onmouseover', '');
});


Because now you have a syntax error in your gk.menu.js file.
User avatar
Administrator


cron