I have the tab-based page with a first tab open when the page is loaded.
The problem is that I want to create a link to open and scroll to some of the other tabs.
Here is the Tab code:
<li>ADVANTAGES</li>
It works when you add #something at the end of the URL, but the problem is that you can not trigger the tab opening from button or link on the same page.
Example: If you want to lead someone from the page to open tab different than first.
The Question is: Is there a way to trigger and open another tab different than the first one
Related
Is there any way to change the script in page so i can make a button go to a specific page? Like, using inspect element? I want the open a page and add a script in the button of this page, so it can go to the url i add.
only if you have created that target tab. then you can send a message with anything and use eval in document in target tab
I have a page with multiple links that opens a foundation reveal modal. Each link opens the same modal. The problem is that I have some links on the top of the page, and some links on the bottom, so when I click on some link from the top, if I close the modal, the last link get the focus, so the page scrolls down to the last element that opens this unique modal.
Someone knows how can I fix this issue?
See https://github.com/zurb/foundation-sites/issues/10604 . One workaround is to open the modal via js instead of with data-open on each link. ie:
$('.open-my-modal-link').click(function() {
$('#my-modal').foundation('open');
...
So at the moment I have a page which uses two tabs, each tab is display none until the associated tab button at the top is clicked. I'm usin jquery for the click event.
At the moment let's say tab 1 is the default, I need to navigate to tab 2 from another page.
I was wondering if I could add something to the link on the other page which would act as a click on the tab button.
Any way, really need some help on this 😇
$(document).ready(function(){
if(window.location.hash == "#tab2"){
$(".tab-label-2").click();
}
});
Putting the above into the page with the tabs on. Add #tab2 to the end of the link you're clicking on
window.location.hash checks anything from the #. if it's the same it will run the function which in the above case is clicking on something
In the website I am building I have a link to another webpage set with a target of _blank to open in a new tab.
If I click the link and then switch back to the 1st page and click the link again it opens a 3rd tab.
Is there any way to get the browser to just switch back to the already open tab for the 2nd webpage?
You can use target="secondPage", this create a named window/tab and every links that a user click that has this target will be opened in this page.
Other than this, I don't think it's possible nor a good thing. You should not tell the user how to manage his tabs/windows.
I've got a mobile web app that has multiple anchors with target='__blank'. When the first anchor is clicked, the browser will open up a new tab and load the desired page. When subsequent anchors are clicked, the desired page is loaded in the same new tab.
The desired effect is to have each anchor open up a new tab when clicked, so that multiple tabs can be opened at the same time.
Does anyone know how to achieve this?
It should be _blank. Just a single underscore. Your double underscores are creating a window actually named __blank, causing all links to target that particular window.