Open shofer4eto opened 8 years ago
Quickest way is put the full url including the tab anchor eg http://www.mysite.com/#tab1
Hi,
I don't want the page to reload though...
Did you ever figure this out shofer4eto? I'd like to do the same thing and even using the full URL doesn't work for me in FF or Chrome.
This worked for me. First add a class to all Anchor tags with the local hashtag. At the bottom of the easyResponsiveTabs.js file, add the following:
jQuery(document).ready(function () { jQuery(".linkClass").click(function () { var hash = jQuery(this).attr('href').replace(/^.*?#/,''); window.location.hash = "#"+hash; location.reload(); }); });
Replace "linkClass" with the class you used on your anchors. This is kind of crude. jQuery will monitor the hash tag links. When they are clicked it will grab the hash, append it to the page URL and reload the page.
Surely there must be a less crude way, this^ effectively is the same as linking to the full URL
Hi,
Awesome plugin! How do I activate a tab by clicking on an anchor on the Same page? For example I have some tabs, then at the bottom of the page I have a button that links to "#tab1", I want clicking on it to activate "tab1" from my tabs? Thanks in advance!