jquery - remove/add class reload's improperly unless position absolute -


i've created simple jquery slideshow, have issue when class removed active image , placed on next one.

when images position relative: after class removed new image briefly reloads underneath slideshow

when images position absolute: navigation of slideshow become broken , no longer dynamic!

here looks when it's relative

here looks when it's absolute

how go fixing issue?

the problem relative approach seams new image appears before last 1 disappear completely, new image jump on container. change sliderresponse function this:

function sliderresponse(target) {   images.fadeout(300).promise().done(function(){   triggers.removeclass('selected').eq(target).addclass('selected');   images.eq(target).fadein(300);             }); } 

i used same code of http://storeco.de/, changed function...

it's working on chrome, didn't tested in other browsers can try it.

that happened because have:

images.fadeout(300).eq(target).fadein(300); triggers.removeclass('selected').eq(target).addclass('selected'); 

so, when fadeout work opacity, content of image still there, when fade in newone comes next , remove('selected') , addclass('selected') jump... if this:

 images.fadeout(300).removeclass('selected').eq(target).fadein(300);  triggers.removeclass('selected').eq(target).addclass('selected'); 

it works!


Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -