jQuery simpletabs plugin

Posted on Thu, 17 Feb 2011 in by Pål Oliver Kristiansen

Here is an example of how to use the plugin:

First the markup:


Then the jQuery setup:

jQuery(”#tabs”).simpletabs({
  onload: {
    ‘firstTabContents’: function(){
       firstTab.load();
     },
     ‘secondTabContents’: function(){
       secondTab.load();
     }
  },
  onshow: {
    ‘firstTabContents’: function(tabId){
      firstTab.load();
    },
    ‘secondTabContents’: function(tabId){
      secondTab.load();
    }
  }
});