Full configuration

$('.tabscontent').tabbedContent({
links : '.tabs a', // the tab links
errorSelector : '.error-message', // false to disable
speed : false, // speed of the show effect. Set to null or false to disable
onSwitch : false, // onSwitch callback
onInit : false, // onInit callback
currentClass : 'current', // current selected tab class (is set to link's parent)
tabErrorClass : 'has-error', // a class to be added to the tab where errorSelector is detected
history : true, // set to false to disable HTML5 history
historyOnInit : true, // allows to deactivate the history for the intial autmatic tab switch on load
loop : false // if set to true will loop between tabs when using the next() and prev() api methods
});

API

TabbedContent has a simple API that will allow you to switch between tabs.
To use it simply call data('api'):

var mytabs = $('.tabscontent').tabbedContent().data('api');
// now you can use the switch method:
mytabs.switch('#tab-1');
// or using it's index...
mytabs.switch(0); // note that first tab begins at 0
// you can also switch using id (whout #) and jQuery/Zepto objects
mytabs.switch('tab-1');
mytabs.switch($('.tabscontent div#tab-1'));
// you can also switch to next and previous tabs
mytabs.next();
mytabs.prev();
// the previous example won't loop the tabs; to do so you can set loop to true when configuring tabbedContent:
var mytabs = $('.tabscontent').tabbedContent({loop: true}).data('api');
// and / or you can pass it directly to the method:
mytabs.next(true);
mytabs.prev(true);
// check if current tab is first or last
if (mytabs.isFirst()) { /* do stuff */ }
if (mytabs.isLast()) { /* do stuff */ }

License

The MIT License (MIT)
Copyright (c) 2015-2017 Òscar Casajuana <elboletaire at underave dot net>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.