Skip to content
This repository was archived by the owner on Apr 9, 2019. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions js/liteaccordion.jquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@

// start elem animation
play : function(index) {

var next = core.nextSlide(index && index);

if (core.playing) return;
Expand Down Expand Up @@ -116,6 +117,17 @@
methods : methods,
core : core
};
},
resize:function(data){
//User Passes containerWidth,ContainerHeight and firstSlide
settings = $.extend({}, defaults, data),
slides = elem.children('ol').children('li'),
header = slides.children(':first-child'),
slideLen = slides.length,
slideWidth = settings.containerWidth - slideLen * settings.headerWidth;


core.setStyles();
}
},

Expand Down Expand Up @@ -388,7 +400,8 @@

};

$.fn.liteAccordion = function(method) {
$.fn.liteAccordion = function() {
var method=arguments[0];
var elem = this,
instance = elem.data('liteAccordion');

Expand All @@ -407,14 +420,16 @@

// otherwise, call method on current instance
} else if (typeof method === 'string' && instance[method]) {
arguments = Array.prototype.slice.call(arguments, 1);
// debug method isn't chainable b/c we need the debug object to be returned
if (method === 'debug') {
return instance[method].call(elem);
} else { // the rest of the methods are chainable though
instance[method].call(elem);
instance[method].apply(elem, arguments);

return elem;
}
}
};

})(jQuery);
})(jQuery);