Skip to content
Dimitris Krestos edited this page Nov 16, 2016 · 33 revisions

Table of Contents

Default Options

$('.tabs').tabslet({
	mouseevent:   'click',
	attribute:    'href',
	animation:    false,
	autorotate:   false,
	deeplinking:  false,
	pauseonhover: true,
	delay:        2000,
	active:       1,
    container:    false
	controls:     {
		prev: '.prev',
		next: '.next'
	}
});

"mouseevent" option

  • Select tab on click or on hover
  • options: click, hover
$('.tabs').tabslet({
	mouseevent: 'hover'
});

"attribute" option

  • Use href or alt attribute to select tabs
  • options: href, alt
$('.tabs').tabslet({
	attribute: 'alt'
});

"animation" option

  • Enables javascript animation effect on tabs change
  • options: false, true
$('.tabs').tabslet({
	animation: true
});

"autorotate" option

  • Enables automatic rotation of the tabs
  • options: false, true
$('.tabs').tabslet({
	autorotate: true
});

"deeplinking" option

  • Enables deep linking support and changes the active tab based on the location hash
  • options: false, true
$('.tabs').tabslet({
	deeplinking: true
});

"pauseonhover" option

  • Stops autorotation as long as the mouse is over the tabs
  • options: false, true
$('.tabs').tabslet({
	autorotate: true,
	pauseonhover: true
});

"delay" option

  • Sets the delay on automatic rotation
  • options: number in ms
$('.tabs').tabslet({
        autorotate: true,
	delay: 6000
});

"active" option

  • Select which tab will be visible at the beginning
  • options: number or false
$('.tabs').tabslet({
        active: 1
});

"container" option

  • Overrides the default html structure and sets the proper tabs container
  • options: element class or id or false
$('.tabs').tabslet({
        container: '#container_id'
});

"controls" options

  • Set previous and next element
  • options: element class
$('.tabs').tabslet({
	controls: {
		prev: '.prev',
		next: '.next'
	}
});

Note: Except control options, all the other options can be set via data attributes.