Hope it helps you all … it helps me…
Thanks @Pealco , yeah that opens tab on the same page. Funny enough there was already a thread about that somewhere if I recall.
This is about targeting a tab on another page and then scrolling to it.
In the waffle in that thread is a reply to the question I asked @Norm
And I quote,
Reply from Norm.
" Hi Andy,
Yeah that will not work as the tab is controlled by JS and when you navigate to a new link you cant tell the new page to run a JS function as JS hasn’t even been loaded for the page.
Navigating to a page and setting the active tab based on link, would require PHP I think."
Peace and love my friends
I had to give up and split the design over 3 pages.
It worked out for the best as it turned out I also had an issue with a script from an Instagram plugin I use.
I changed the way this was waiting for the page to finish loading also. I think that helps too.
You’r right… yes in different page it will be difficult to scroll to that specific point (with windows on.load) as if this page have different content then when the page loads it will scroll always to that point.
Yes, I hope to solve it though. But for the moment, URL parameters seems to be more reliable than using hash.
The strange behavior is if you create a html bric inside each tab with a div inside like tab-1 / tab-2 / tab-3 then in the first page you can call that specific div by calling href like page2.html#tab-1
Then you will see opening the second page and scrolls to that tab, but if you create a second link in the first page to the next div it will open the second page but down scroll to the second tab…
An easy solution is just to add another parameter that scrolls to the bloc ID that has the tabs. Regardless of what tab is open.
But that’s too easy
My current semi working code, grabs the parent DIV of the active Tab.
waiting for result, remember to put a donation PayPal button…
Absolutely right… (EDIT: It was something here before )
And the issue is some times I’m working in my projects, then I came here, check some topics and when I see someone struggle I save my work, open a new project, create code, create buttons, export, test, then take screenshots, insert instructions so other people find it if they need, and I waste 1 or 2 hours and in the end we just have a thank you… (and sometimes don’t even bother replying and thanking) I will start to link my PayPal donation button…
Or they come back to the forum 2 months later. LOL
I modified a slider for products with buy buttons, and the person has never been back on the forum since asking for help.
Well, what we still don’t know how to do is this. Click a text link that will not only open a tab but also scroll to a specific point within that tab!
This type of “scroll to anchor“ problem as long existed in Blocs in that we can only smooth scroll to the top of individual blocks, rather than to specific content within those blocs.
Why is this important? Because if you have a lot of content in a particular tab you may want to scroll to that content rather than to the top of the tab.
No, this is a simple solve. I have it working here. This scrolls to an ID in a span.
Great work, Pete! Would you please post that example document for us?
Also, please let us know when you are finally able to construct a text link that, when clicked, will not only open tab but also scroll to “an ID in a span” within that tab!
I made it a custom bric, it works for any
<a> or buttons. I haven’t setup my support site for the Bric yet. So once I do that, you can download the Bric and just add to you project.
But basically your forthcoming Bloc will do only what is shown in your video; namely, jump to any point on the page (which is great!), but it won’t open a tab and then jump to a point within that tab, or will it?
It’s kinda working now. I just threw the “Smooth Scroller” bric into the other project, and they almost worked together . Its jerky, I was not expecting it to work as well as it did. I might look at incorporating the two.
The Smooth Scroller Bric needs a bit more work, especially around the offset for the top of the page. It needs to allow for navigation bar etc.
I don’t think it matters too much if its jerky, especially for those Blocs users who have websites about beef!