Skip to content

Commit 7c25088

Browse files
committed
Fix controls
Issue vdw#13
1 parent e9e6c40 commit 7c25088

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

demo/javascripts/vendor/jquery.tabslet.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jquery.tabslet.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@
4747

4848
var $this = $(this);
4949

50+
// Autorotate
51+
var elements = $this.find('> ul li'), i = options.active - 1; // ungly
52+
5053
if ( !$this.data( 'tabslet-init' ) ) {
5154

5255
$this.data( 'tabslet-init', true );
@@ -74,6 +77,8 @@
7477
$(this).addClass('active');
7578
$this.find('> div').hide();
7679

80+
i = elements.index($(this));
81+
7782
var currentTab = $(this).find('a').attr(options.attribute);
7883

7984
if (options.animation) {
@@ -99,9 +104,6 @@
99104

100105
init;
101106

102-
// Autorotate
103-
var elements = $this.find('> ul li'), i = options.active - 1; // ungly
104-
105107
var forward = function() {
106108

107109
i = ++i % elements.length; // wrap around

jquery.tabslet.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)