I`m making some functions with Jquery. but I got problem.
function fader(elm,delaytime) {
elm.each(function(index){
$(this).css('visibility','visible').delay(delaytime*index);
$(this).fadeIn(1500);
});
}
fader($('.subImgs').children(),200);
It was good, and I wanted more.
$.fn.fader2 = function(elm,delaytime) {
elm.each(function(index){
$(this).css('visibility','visible').delay(delaytime*index);
$(this).fadeIn(1500);
});
}
$('.subImgs').children().fader2(200);
It doesn't work. I know something was different but I couldn't find it. anyone can help me?
elmhas the value200. It does not refer to the selected elements.