0

I have 3 tabs on this page http://fiftyallstars.com/tabs.html that I'm trying to target with 3 distinct direct links. Is it possible to have a script read an appended URL to remove/add the necessary active class to achieve the results I'm attempting to achieve. Any other suggestions would be great as well.

PS I'm not great at coding, but I'll try my hardest. Thanks!

3
Contributors
2
Replies
38
Views
4 Months
Discussion Span
Last Post by jstfsklh211
1

I have another suggestion and that is using the HTML5 History API (pushState and AJAX) for this. This will also work with the browser back button and you don't get all this content in one document unlike your tab implementation.

Here's a little tut and example demo:
https://css-tricks.com/using-the-html5-history-api/

Edited by gentlemedia

0

you can use the document.location.href to look up the url and then append the new class to the appropriate element
add distinct classes or ids to your tabs to make then easy to find

Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.