-
Author
-
March 25, 2017 at 16:53 #156659gfischParticipant
Hi Laura
I am trying to find a solution to scroll to an anchor like #main instead to the top, when users select profile tabs or click on the arrow next to “Profile” in the top right and for instance select “Messages”
This would be great because right now users have to scroll a lot.
Now I found this suggestion here https://buddypress.org/support/topic/scroll-down-user-profile-page/ that says
Try finding your
<body>
tag in header.php then add an onload event attribute like this:<body onload=' location.href="#anchor" '>
Then in your template:
<div id='anchor'>whatever</div>
When the page loads ‘whatever’ will be at the top of your screen
Would this work? I am asking because searching in the knowledge database I found threads that say it would NOT be easily possible.https://archived.seventhqueen.com/forums/topic/scroll-down-user-notifications-or-whatever
Radu wrote this
The solution is to add to every link at the end this div name #item-nav
Example : http://localhost/sweetdate/members/test/notifications/#item-navIndeed, adding #item-nav to each link would nearly do what I would want.
#main would be even better because the profile tabs would be still accessable.Could you combine this #main to the link approach with this mentioned onload event?
P.S. I am still working on the SFW staging site – but it is not ready yet.
Regards
Andreas
March 27, 2017 at 11:48 #156755LauraModeratorHello, will assign the ticket to a higher support level who can help and advise you in your query.
Thanks! ?Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
March 28, 2017 at 17:20 #156958RaduModeratorMost probably yes but this it’s something custom or you should have some html js knowledges
You can try this solution : http://stackoverflow.com/questions/22453332/scroll-to-div-on-page-load
I cannot support this it’s somthing custom, it’s only a suggestion.
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
You must be logged in to reply to this topic.