Ask your WordPress questions! Pay money and get answers fast! (more info)

Browser History API and Tabs Shortcode WordPress

  • REFUNDED

Hello,

I need help with a website I built using a custom WordPress child theme which uses the Enfold theme as its parent theme.

I need to enable the back button to work with the built in Tabs shortcode.

An example page on the site with tabs is located here:
http://www.epeat.net/resources/for-manufacturers/

Here is a sample of the default tabs shortcode in action on the default parent theme:
http://www.kriesi.at/themes/enfold/shortcodes/tabs/

As you can see the tabs already dynamically add a # and the tab title to the end of the url. However, it does not get added to the browser history so when a user clicks on the back button (after clicking around on a few tabs) it takes them back to the previously loaded page, not the last tab they were looking at.

I've looked at a few sources for getting this to work the way we want, such as:

http://benalman.com/projects/jquery-hashchange-plugin/
http://texcellency.wordpress.com/2011/10/29/jquery-ui-tabs-with-browser-back-button-support/
http://www.asual.com/jquery/address/

I think one of those may work. I just need help implementing the correct solution.

Here is the default theme Tab Shortcode js:
http://snippi.com/s/uir0cld

Here is the Tab Shortcode php file:
http://snippi.com/s/4k4wn6h (the part that outputs the tabs is near line 191)

I realize this question/request may need more information or source code. If so, please just let me know what you need and I will try to get it to you.

I am hoping to have this done in the most minimal and efficient methods possible, without rewriting a lot of the existing code.

Please let me know if you think you could figure this out or if you have any other questions.

derek

Answers (4)

2014-01-15

Ryan S answers:

Have you tried using this http://benalman.com/code/projects/jquery-bbq/examples/fragment-jquery-ui-tabs/

There's a code to follow at and a sample.


Hope that helps

2014-01-15

Balanean Corneliu answers:

Hello Derek,
why you dont use this plugin http://alfajango.wordpress.com/jquery-easytabs-plugin/
seems to have the functionality you need.

2014-01-15

Just Me answers:

Can you describe the scenario with a little more detail? What do you click and where do you want to go? The links I tried all open in a new window/tab which means, when I close the windows/tab I am back where I started from already. But maybe you have something else in mind.

2014-01-15

Bob answers:

I think I can solve it. But I need little more time. It will be good if you can provide me theme.