Skip to content

anonymous /gist:615280

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
//after default and windowLoaded
var idc = 0;
==============================================
$.jcarousel = function(e, o) {
this.options = $.extend({}, defaults, o || {});
this.locked = false;
this.container = null;
this.clip = null;
this.list = null;
this.buttonNext = null;
this.buttonPrev = null;
//PAUL - 2010/10/05 - Adding a "unique" id to carousel to avoid conflict for nested jcarousels.
this.uniqid = idc++;
[...]
===============================================
format: function(e, i) {
var e = $(e), split = e.get(0).className.split(' ');
for (var j = 0; j < split.length; j++) {
if (split[j].indexOf('jcarousel-') != -1) {
e.removeClass(split[j]);
}
}
//Adding uniqid
e.addClass(this.className('jcarousel-item')).addClass(this.className('jcarousel-'+this.uniqid+'-item-' + i)).css({
'float': (this.options.rtl ? 'right' : 'left'),
'list-style': 'none'
}).attr('jcarouselindex', i);
return e;
}
===============================================
get: function(i) {
//PAUL - 2010/10/05 - Adding uniq
return $('.jcarousel-'+this.uniqid+'-item-' + i, this.list);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.