Codeinwp / carouFredSel-jQuery

A circular, responsive carousel plugin built using the jQuery.
http://caroufredsel.dev7studios.com
Other
318 stars 476 forks source link

data.new.item is undefined (onAfter callback) #6

Open ravbetsky opened 11 years ago

ravbetsky commented 11 years ago

Hello! Thanks for awesome plugin, but it seems that i found a bug.

$("#foo").carouFredSel({ scroll: { onAfter: function( data ) { data.items.new.addClass("active" ); } } });

data.items.new is undefined, after some researches i found that there is no return for 'new'

Here is the piece of source code at the line 2904:

function sc_mapCallbackArguments(i_old, i_skp, i_new, s_itm, s_dir, s_dur, w_siz) { //... 'items': { 'old': i_old, 'skipped': i_skp, 'visible': i_new } //... }

I tried to use visible, but it actually returns the first element.