Fix: Minor issue with main navigation on touch ready devices

There is a minor issue with how the main navigation functions on touch ready devices. You will be able to replicate if you use a larger screen touch device (e.g. iPad horizontal orientation) that does not display the navigation in the burger menu. When you go to a page with a sub menu drop down the drop will appear on first load of the page.

If you are already running one of the theme version affected then please follow our instructions below to rectify the issue.

We will be releasing minor versions of all themes shortly with this fix included.

 

Step 1. Update CSS

Login to CMS > Go to Settings > Expand Stylesheets > Open layout >  Go to line 642 (may vary slightly depending on theme)

Find: 

.navigation nav.main ul li.has-child.open > ul {

Change to: 

.navigation nav.main ul li.has-child.open-mobile > ul {

 

Step 2. Update Javascript

Login to CMS > Go to Settings > Expand Scripts > Open application >  Go to line 55 (may vary slightly depending on theme)

Find: 

$(".navigation nav.main ul li span i").click(function(){
if ($(".navigation nav.main ul li span i").length ) { 
$(this).parent().parent().toggleClass("open");
    $(this).parent().parent().siblings().removeClass("open");
}
else{
    $(this).parent().parent().toggleClass("open");
}
});
$(".navigation nav.main ul li span.active").parent("li").addClass("open");

Change to: 

$(".navigation nav.main ul li span i").click(function(){
if ($(".navigation nav.main ul li span i").length ) { 
$(this).parent().parent().toggleClass("open").toggleClass("open-mobile");
    $(this).parent().parent().siblings().removeClass("open").removeClass("open-mobile");
}
else{
    $(this).parent().parent().toggleClass("open").toggleClass("open-mobile");
}
});
$(".navigation nav.main ul li span.active").parent("li").addClass("open-mobile");

 

comments powered by Disqus

Get started today

Join thousands of agencies, freelancers, enterprises & start ups worldwide who use uSkinned Umbraco themes to deliver results.