0

I have been trying out this jquery SliderTabs from this site "http://lopatin.github.com/sliderTabs/". Everything works fine, I'm just having issues using an outside link to go to a specific tab. Here is my following code:

<script>
$(function(){
 $('#customers').sliderTabs();  

if(document.location.hash!='') {
        //get the index from URL hash
        selectedTab = document.location.hash.substr(1,document.location.hash.length);
        $("#customers").sliderTabs('select', selectTab - 1);
    }

  });
</script>

But it just doesn't seem to work for me. Could anyone help me with this?

Iman
  • 17,932
  • 6
  • 80
  • 90
user1555843
  • 23
  • 1
  • 3

1 Answers1

0

I don't see any documentation for the plugin that relates to public functions you can use. Looking through the source code at line #230 it looks like you want to use the option of "selectTab" instead of "select" like in jquery-ui tabs. https://github.com/lopatin/sliderTabs/blob/master/jquery.sliderTabs.js

$("#customers").sliderTabs("selectTab", selectTab - 1);
jholloman
  • 1,959
  • 14
  • 16
  • Did this work for you? @user1555843 I am having the same issue and get `Uncaught TypeError: Cannot read property 'selectTab' of undefined` when trying `var date = $(this).datepicker('getDate'); var dayOfWeek = date.getUTCDay(); $("#tabsDiv").sliderTabs("selectTab", dayOfWeek);` – user2329438 Jan 23 '15 at 11:37