- Posts: 6
- Thank you received: 0
Menu link loses
-
giobz74
Inactive member - New Member
Less
More
-
ivan.milic
Support Staff - Moderator
Less
More
- Posts: 14116
- Thank you received: 1639
11 years 7 months ago #28643
by ivan.milic
Replied by ivan.milic on topic Menu link loses HELP !!!!
First do this:
Open:
templates/hot_food_spirit/js/hot_food_spirit.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){
event.preventDefault();
try{
jQuery('html,body').animate({scrollTop:jQuery(this.hash).offset().top}, 500);
}catch(e){
jQuery('html,body').animate({scrollTop:0}, 500);
}
});
Then use " external" for "Link CSS Style" in menu item settings when target link place is not on same page.
Second if on same page, if your menu item points to #something you need to have in your content:
<a id="something" name="something">something</a>
Open:
templates/hot_food_spirit/js/hot_food_spirit.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){
event.preventDefault();
try{
jQuery('html,body').animate({scrollTop:jQuery(this.hash).offset().top}, 500);
}catch(e){
jQuery('html,body').animate({scrollTop:0}, 500);
}
});
Then use " external" for "Link CSS Style" in menu item settings when target link place is not on same page.
Second if on same page, if your menu item points to #something you need to have in your content:
<a id="something" name="something">something</a>
The following user(s) said Thank You: plive
Please Log in to join the conversation.
-
giobz74
Inactive member - New Member
Less
More
- Posts: 6
- Thank you received: 0
11 years 7 months ago #28652
by giobz74
Replied by giobz74 on topic Menu link loses HELP !!!!
perfect works fine, thank you very much!!
RG
RG
Please Log in to join the conversation.
-
kilcko
Inactive member - New Member
Less
More
- Posts: 1
- Thank you received: 0
11 years 4 months ago #31828
by kilcko
Replied by kilcko on topic Menu link loses HELP !!!!
Hi there!
How to change scroll speed (from menu to content)?
How to change scroll speed (from menu to content)?
Please Log in to join the conversation.
-
ivan.milic
Support Staff - Moderator
Less
More
- Posts: 14116
- Thank you received: 1639
11 years 3 months ago #31839
by ivan.milic
Replied by ivan.milic on topic Menu link loses HELP !!!!
In this code:
jQuery(".scroll, .mp_topmenu a:not(.external)").click(function(event){
event.preventDefault();
try{
jQuery('html,body').animate({scrollTop:jQuery(this.hash).offset().top}, 500);
}catch(e){
jQuery('html,body').animate({scrollTop:0}, 500);
}
});
500 is in two places, it represents duration of animation so just change that
jQuery(".scroll, .mp_topmenu a:not(.external)").click(function(event){
event.preventDefault();
try{
jQuery('html,body').animate({scrollTop:jQuery(this.hash).offset().top}, 500);
}catch(e){
jQuery('html,body').animate({scrollTop:0}, 500);
}
});
500 is in two places, it represents duration of animation so just change that
Please Log in to join the conversation.
Time to create page: 0.139 seconds