Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixes #7 - Syntax error when using hash option

  • Loading branch information...
commit 48953ff1fbeb10546dda33d83a1228072c72646c 1 parent 2801f0b
@seanmonstar authored
Showing with 5 additions and 6 deletions.
  1. +4 −5 Source/tabs.js
  2. +1 −1  package.yml
View
9 Source/tabs.js
@@ -11,7 +11,7 @@ provides: [MGFX.Tabs]
...
*/
-//MGFX.Tabs. Copyright (c) 2008-2010 Sean McArthur <http://seanmonstar.com/>, MIT Style License.
+//MGFX.Tabs. Copyright (c) 2008-2011 Sean McArthur <http://seanmonstar.com/>, MIT Style License.
if(!window.MGFX) MGFX = {};
@@ -28,11 +28,10 @@ MGFX.Tabs = new Class({
},
initialize: function(tabs, slides, options){
- this.setOptions(options);
this.tabs = $$(tabs);
this.createTabs();
- if(this.options.hash && window.location.hash) {
- this.getHashIndex();
+ if(options.hash && window.location.hash) {
+ this.getHashIndex(options);
}
return this.parent(slides,options);
},
@@ -49,7 +48,7 @@ MGFX.Tabs = new Class({
});
}.protect(),
- getHashIndex: function() {
+ getHashIndex: function(options) {
var hash = window.location.hash.substring(1);
this.tabs.forEach(function(el, index) {
if(el.get('id') == hash) {
View
2  package.yml
@@ -4,4 +4,4 @@ category: Interface
tags: [tabs]
docs: http://github.com/seanmonstar/MGFX.Tabs/blob/master/Docs/mgfxtabs.md
demo: http://seanmonstar.github.com/MGFX.Tabs/
-current: 1.3.0
+current: 1.3.1
Please sign in to comment.
Something went wrong with that request. Please try again.