How to change trigger of Tinynav.

More
11 years 7 months ago #32131 by webdesignduo
I would like to change the Tinynav so it turns on when the window size gets under 750px(width).
Does anyone know how to do this?

Please Log in to join the conversation.

  • milos
    Support Staff
  • Moderator
  • Moderator
More
11 years 7 months ago #32150 by milos
Yes, this is possible. Please edit file /templates/hot_one_page/js/responsive_menu.js and delete all content. Then paste this content:
Code:
function menutransform(){ var screenWidth = jQuery(window).width(); if( screenWidth < 750 ) { jQuery(".tinynav").css("display","block"); jQuery("ul.navh, ul.navv").css("display","none"); jQuery("ul.navh, ul.navv").tinyNav({ active: 'current', // String: Set the "active" class header: 'Navigation', // String: Specify text for "header" and show header instead of the active item }); } else { jQuery(".tinynav").css("display","none"); jQuery("ul.navh, ul.navv").css("display","block"); } }
The following user(s) said Thank You: webdesignduo

Please Log in to join the conversation.

More
11 years 7 months ago #32273 by webdesignduo
It worked ! Thanks a lot :)

Please Log in to join the conversation.

Time to create page: 0.152 seconds
Powered by Kunena Forum