Link to an Anchor on another page
-
Hi there guys,
I know there are several threads on this topic, but I am still having problems linking to an anchor on a different page to the original link.
The company icons on the home page here:
https://limelightmedia.tv/home/are all supposed to link to a specific section on the previous work page here:
https://limelightmedia.tv/previous-work/When I click each link for example #zurich a / appears before the anchor link in the navigation bar eg.
https://limelightmedia.tv/previous-work/#zurichI don't know if that is whats causing the problem...
At the moment I have the code you previously suggested in the custom head content:
<script>
window.laytheme.on('newpageshown', function(){
if(window.location.hash.length > 0){
var id = window.location.hash;
if(jQuery(id).length > 0){
jQuery('html, body').animate(
{ scrollTop: jQuery(id).offset().top },
{ duration: 1200 });
}});
</script>Any further help is massively appreciated!
Cheers! -
Dear @limelight
Did you have a look here?
Definitive guide to 'Smooth scroll to anchors from menu'
http://laythemeforum.com:4567/topic/4200/definitive-guide-to-smooth-scroll-to-anchors-from-menu/2Best!
Marius
-
Hi there Marius,
I have just tried that code and no change i'm afraid...
Any other suggestions??
-
-
Sure thing!
The company icons on the home page here:
https://limelightmedia.tv/home/are all supposed to link to a specific section on the previous work page here:
https://limelightmedia.tv/previous-work/When I click each link for example #zurich a / appears before the anchor link in the navigation bar eg.
https://limelightmedia.tv/previous-work/#zurichI don't know if that is whats causing the problem...
-
Hi there just wondering if you had any updates on this one?
-
-
Hi there Marius,
No, not the row, Just the image icon has a link to:
https://limelightmedia.tv/previous-work#zurichAnd then there is an anchor id=zurich on the previous work page. The same for each company icon... I did just quickly try giving the row an ID on the previous work page, but still no luck...
-
Dear @limelight
I do not see here an ID which could get used as anchor:
Marius
-
Hi there @mariusjopen
The anchor is in the body of the text in the HTML...
-
Hi @mariusjopen
I have changed it so the anchor ID is the div element rather than within the html and still not working i'm afraid.![alt text]
-
Dear @limelight
to make it easy for people to understand:
Can you please paste the code which you used?Best!
Marius
I don't answer or check forum DMs, please just post on the forum.
Before you post:
Use the Search Feature. Maybe there is already a solution to your issue.
1. Update Lay Theme and all Lay Theme Addons
2. Disable all Plugins
3. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code ", click "Save Changes"
4. Now see if your problem solved itself
5. Go here, see if your problem is listed here:
Troubleshooting
When you post:
1. Post a link to where the problem is
2. If the problem is difficult to explain, post screenshots / link to a video to explain it