carouFredSel-jQuery icon indicating copy to clipboard operation
carouFredSel-jQuery copied to clipboard

data.new.item is undefined (onAfter callback)

Open ravbetsky opened this issue 12 years ago • 0 comments

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.

ravbetsky avatar Oct 25 '13 10:10 ravbetsky