Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tabs are index from 1, not 0 #53

Open
mboudreau opened this issue Apr 23, 2012 · 0 comments
Open

Tabs are index from 1, not 0 #53

mboudreau opened this issue Apr 23, 2012 · 0 comments

Comments

@mboudreau
Copy link

I was creating tabs and what trying to figure out why setting it to 1 always chose the first tab since it wasn't mentioned in the documentation and that everything in javascript is zero based index.

For example:
var tabs = $.ninja.tabs({values: [
{html:"no"},
{html:"yes"}
], value: 1});
Would select "no", and not "yes" as expected.

This was changed easily in the ninjaui code by making "0" the default value and removing the "- 1" in

if (i === options.value - 1) {
$tab.select();
}

Under the tabs function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant