Widget:Tabber PageLink

RLQ.push(function { $("a").click(function { console.log('local JS running'); if ($(this)[0].pathname !== location.pathname) { return; } var link_hash = $(this)[0].hash; if (!link_hash) { return; }

var tab_content = $('.tabbertab'); var nav = $('.tabbernav'); var cur_tab = tab_content.filter(function {return $(this).css('display') == 'block';}).first;

var nav_link = nav.find('a[title="' + link_hash.substring(1) + '"]'); if (nav_link.length > 0) { var link_tab = tab_content.filter(function {return $(this).attr('title') == link_hash.substring(1);}).first; cur_tab.hide; link_tab.show; nav.find('.tabberactive').removeClass('tabberactive'); nav_link.parent.addClass('tabberactive'); nav_link.parent[0].scrollIntoView; return; }

var link_tab = $(link_hash).closest('.tabbertab'); if ($(cur_tab).attr('title') !== $(link_tab).attr('title')) { cur_tab.hide; link_tab.show; nav.find('.tabberactive').removeClass('tabberactive'); nav.find('a[title="' + $(link_tab).attr('title') + '"]').parent.addClass('tabberactive'); console.log(nav.find('a[title="' + $(link_tab).attr('title') + '"]').parent); } }); });