akaIDIOT/MooTools-TabPane — Issue #1: Select tab from fragment URL for focus tabs
Author: shakaran
Created: 2012-02-15 19:53:08+00:00
State: open

Hi,

I am using your TabPane script (it is very useful) and I have a feature request.

When a user press a tab, if he reloads the page, the first tab is always loaded and he loses the focus tab. I am using a piece of code on domready event (as patch) for detect if there are some fragment part on URL and set the tab properly:

var fragment = document.URL.split("#")[1]
if(fragment && fragment.indexOf("tab") != -1) // I named all the
element as:

{
var index = $("my_tab_pane").getElements(".tab").indexOf($(fragment))
tabPane.showTab(index, $(fragment))
}

Could you include a similar feature by default for autofocus tabs? Also, it would be useful load tabs from Ajax content request.