- Posts: 19
- Thank you received: 0
Anchors not working!
-
cybernun
Inactive member - Topic Author
- New Member
Less
More
11 years 11 months ago #24636
by cybernun
Anchors not working! was created by cybernun
1. NONE of the UP icons at bottom of each article are working.
<div align="center" class="clr"><a href="#top" class="scroll"><img src="images/top.png" alt="back" to="" top="" /></a></div>
2. And once I edited my first article, the menu no longer works for it either (the others do work although I haven't edited the other page articles yet). This is the correct ID code for the first "WELCOME" article page:
<p><a id="welcome"></a></p>
Can anyone please help? :kiss:
<div align="center" class="clr"><a href="#top" class="scroll"><img src="images/top.png" alt="back" to="" top="" /></a></div>
2. And once I edited my first article, the menu no longer works for it either (the others do work although I haven't edited the other page articles yet). This is the correct ID code for the first "WELCOME" article page:
<p><a id="welcome"></a></p>
Can anyone please help? :kiss:
Please Log in to join the conversation.
-
ivan.milic
Support Staff - Moderator
Less
More
- Posts: 14116
- Thank you received: 1639
11 years 11 months ago #24644
by ivan.milic
Replied by ivan.milic on topic Anchors not working!
send link!
Please Log in to join the conversation.
-
cybernun
Inactive member - Topic Author
- New Member
Less
More
- Posts: 19
- Thank you received: 0
11 years 11 months ago #24684
by cybernun
Replied by cybernun on topic Anchors not working! - PROBLEM SOLVED
/templates/hot_one_page/js/hot_onepage.js
jQuery(".scroll, .mp_topmenu a").click(function(event){
event.preventDefault();
jQuery('html,body').animate({scrollTop:jQuery(this.hash).offset().top}, 500);
});
modify it like this:
jQuery(".scroll, .mp_topmenu a").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);
}
});
jQuery(".scroll, .mp_topmenu a").click(function(event){
event.preventDefault();
jQuery('html,body').animate({scrollTop:jQuery(this.hash).offset().top}, 500);
});
modify it like this:
jQuery(".scroll, .mp_topmenu a").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);
}
});
Please Log in to join the conversation.
-
ivan.milic
Support Staff - Moderator
Less
More
- Posts: 14116
- Thank you received: 1639
11 years 11 months ago #24694
by ivan.milic
Replied by ivan.milic on topic Anchors not working! - PROBLEM SOLVED
just one fix:
so you could use external as class for external link in menu item
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);
}
});
so you could use external as class for external link in menu item
Please Log in to join the conversation.
-
sandbox
Inactive member - New Member
Less
More
- Posts: 3
- Thank you received: 0
11 years 10 months ago #25465
by sandbox
Replied by sandbox on topic Anchors not working! - PROBLEM SOLVED
I have the same problem
why have you not updated the template package if it is now a know error? How do I fix this?
thanks
why have you not updated the template package if it is now a know error? How do I fix this?
thanks
Please Log in to join the conversation.
-
ivan.milic
Support Staff - Moderator
Less
More
- Posts: 14116
- Thank you received: 1639
11 years 10 months ago #25474
by ivan.milic
Replied by ivan.milic on topic Anchors not working! - PROBLEM SOLVED
Open
/templates/hot_one_page/js/hot_onepage.js
and do replace described above
/templates/hot_one_page/js/hot_onepage.js
and do replace described above
Please Log in to join the conversation.
Time to create page: 0.256 seconds