Menu not work

More
11 years 9 months ago #31214 by mojastran
Replied by mojastran on topic Menu link
Hi,

is there any way to link menu item to a certain tab, for instance in demo page "people" to tab named "finance", so this tab would be active, when user clicks on this menu item.

Best regards.

Please Log in to join the conversation.

More
11 years 9 months ago #31227 by ivan.milic
Replied by ivan.milic on topic Menu link
You can try , use tab hash for menu item link, #tabid if that does not work you can try to simulate click on actual tab button menu link would be:
Code:
http://javascript::jQuery('a[href="#tabid"]').trigger('click');

Please Log in to join the conversation.

More
11 years 9 months ago #31242 by mojastran
Replied by mojastran on topic Menu link
Thanks, but none of these work. The second opens blank page.

Please Log in to join the conversation.

More
11 years 9 months ago #31246 by ivan.milic
Replied by ivan.milic on topic Menu link
Send link

Please Log in to join the conversation.

More
11 years 9 months ago #31257 by mojastran
Replied by mojastran on topic Menu link
The link is zwcad.mojastran.net/programska-oprema/zwcad/zwcad-professional
I'd like to link "prenosi" to the tab with the same name.
I know that by default it is not possible to link menu item to a certain tab, but if there is a way to do that i'd be grateful for your help.

Best regards

Please Log in to join the conversation.

More
11 years 9 months ago - 11 years 9 months ago #31273 by ivan.milic
Replied by ivan.milic on topic Menu link
If that menu item is in top menu, open:

templates/hot_one_page/js/hot_onepage.js
Code:
jQuery(".scroll, .mp_topmenu a:not(.external)").click(function(event){ if(jQuery(this.hash)[0]){ event.preventDefault(); try{ jQuery('html,body').animate({scrollTop:jQuery(this.hash).offset().top}, 500); }catch(e){ jQuery('html,body').animate({scrollTop:0}, 500); } } });

change to
Code:
jQuery(".scroll, .mp_topmenu a:not(.external)").click(function(event){ if(jQuery('.ui-tabs ' + jQuery(this).attr('href'))[0]){ jQuery('.ui-tabs ' + jQuery('.ui-tabs a[href="' + jQuery(this).attr('href') + '"]')).trigger('click'); }else if(jQuery(this.hash)[0]){ event.preventDefault(); try{ jQuery('html,body').animate({scrollTop:jQuery(this.hash).offset().top}, 500); }catch(e){ jQuery('html,body').animate({scrollTop:0}, 500); } } });
Last edit: 11 years 9 months ago by ivan.milic.

Please Log in to join the conversation.

Time to create page: 0.090 seconds
Powered by Kunena Forum