- Posts: 4
- Thank you received: 0
External Link in Menu not working
-
reginac
Inactive member - Topic Author
- New Member
Less
More
11 years 9 months ago - 11 years 9 months ago #27064
by reginac
External Link in Menu not working was created by reginac
Hello I recently bought this nice template, but i´m having some trouble creating a new menu item with an external link tho. I already read the other posts but those solutions didnt solve my problem.
In Main Menu I created an external url. In link css style added "external" but the link doesn´t work. I also replaced the code but still nothing happened.
Can you help me please?
Thanks
In Main Menu I created an external url. In link css style added "external" but the link doesn´t work. I also replaced the code but still nothing happened.
Can you help me please?
Thanks
Last edit: 11 years 9 months ago by reginac. Reason: Just dont want to link to my domain. Thank you
Please Log in to join the conversation.
-
ivan.milic
Support Staff - Moderator
Less
More
- Posts: 14116
- Thank you received: 1639
11 years 9 months ago #27069
by ivan.milic
Replied by ivan.milic on topic External Link in Menu not working
Did you did this:
Open:
/templates/hot_one_page/js/hot_onepage.js
replace:
jQuery(".scroll, .mp_topmenu a").click(function(event){
event.preventDefault();
jQuery('html,body').animate({scrollTop:jQuery(this.hash).offset().top}, 500);
});
with:
jQuery(".scroll, .mp_topmenu a:not(.external)").click(function(event){
jQuery(".active").removeClass("active");
jQuery(this).closest("LI").addClass("active");
event.preventDefault();
try{
jQuery('html,body').animate({scrollTop:jQuery(this.hash).offset().top}, 500);
}catch(e){
jQuery('html,body').animate({scrollTop:0}, 500);
}
});
Open:
/templates/hot_one_page/js/hot_onepage.js
replace:
jQuery(".scroll, .mp_topmenu a").click(function(event){
event.preventDefault();
jQuery('html,body').animate({scrollTop:jQuery(this.hash).offset().top}, 500);
});
with:
jQuery(".scroll, .mp_topmenu a:not(.external)").click(function(event){
jQuery(".active").removeClass("active");
jQuery(this).closest("LI").addClass("active");
event.preventDefault();
try{
jQuery('html,body').animate({scrollTop:jQuery(this.hash).offset().top}, 500);
}catch(e){
jQuery('html,body').animate({scrollTop:0}, 500);
}
});
Please Log in to join the conversation.
-
reginac
Inactive member - Topic Author
- New Member
Less
More
- Posts: 4
- Thank you received: 0
11 years 9 months ago #27071
by reginac
Replied by reginac on topic External Link in Menu not working
Yup and did it again, but nothing happened.
Please Log in to join the conversation.
-
reginac
Inactive member - Topic Author
- New Member
Less
More
- Posts: 4
- Thank you received: 0
11 years 9 months ago #27073
by reginac
Replied by reginac on topic External Link in Menu not working
Any advice?
Thanks
Thanks
Please Log in to join the conversation.
-
ivan.milic
Support Staff - Moderator
Less
More
- Posts: 14116
- Thank you received: 1639
11 years 9 months ago #27087
by ivan.milic
Replied by ivan.milic on topic External Link in Menu not working
Maybe you just need to refresh browser so new script loads. Did you put " external" for menu item class ?
The following user(s) said Thank You: reginac
Please Log in to join the conversation.
-
reginac
Inactive member - Topic Author
- New Member
Less
More
- Posts: 4
- Thank you received: 0
11 years 9 months ago - 11 years 9 months ago #27096
by reginac
Replied by reginac on topic External Link in Menu not working
Solved. My mistake, I literally typed "external" (with quotes) ,changed it for external (without quotes) and now it works like a charm. thank you for your patience and advice Great work.
Last edit: 11 years 9 months ago by reginac. Reason: Solved
Please Log in to join the conversation.
Time to create page: 0.160 seconds