//xeno: added support to copy for data- attributes var img_attributes = $(found_img).prop("attributes"); $.each(img_attributes, function() { if(this.name.indexOf('data-') > 0) $(imgClone).attr(this.name, this.value); });
if(transition == undefined || !flux.transitions[transition]) { //xeno: Added support to check a data-transition attribute //if it exists then use that as the transition var trans = $(this.getImage(this.currentImageIndex)).attr('data-transition'); if(trans === undefined){ // Pick a transition at random from the (possibly reduced set of) transitions var index = Math.floor(Math.random()*(this.options.transitions.length)); transition = this.options.transitions[index]; }else{ transition = trans; } }
Cycle. Best slider. Now in the flavour of 2.http://jquery.malsup.com/cycle2Nivo can be a cunt to set up, Flux I have not played with, but cycle is the most flexible thing I've ever used. Almost never go past it. Now also has plugin for 'tiles' (nivo-like behaviour). Even if you don't use it for images, can use it for messages, or anything (it's not just an image slider, it cycles any element).http://www.joelambert.co.uk/flux/Flux does look extremely sexy, but looks like it needs CSS3 features (so bascially no IE < 10).Thanks for protip tho xeno.
So I used cycle and it went fucking swimmingly cheers for the tip.