testimonials

Jquery Testimonial fader does not work smoothly

妖精的绣舞 提交于 2019-12-20 04:15:26
问题 I use jquery to rotate my div one by one using fade effect but the effect is not smooth it jumps up and down and then display here is my fiddle. http://jsfiddle.net/xXRwA/ $(document).ready(function(e) { $('.testimonials div:first').show(); setInterval(function(){ $('.testimonials div:first-child').fadeOut().next('div').fadeIn().end().appendTo('.testimonials') },3000); }); 回答1: Add the following CSS: .testimonials { position: relative; } .testimonials .a { position: absolute; } This will put

Jquery Testimonial fader does not work smoothly

淺唱寂寞╮ 提交于 2019-12-02 07:04:21
I use jquery to rotate my div one by one using fade effect but the effect is not smooth it jumps up and down and then display here is my fiddle. http://jsfiddle.net/xXRwA/ $(document).ready(function(e) { $('.testimonials div:first').show(); setInterval(function(){ $('.testimonials div:first-child').fadeOut().next('div').fadeIn().end().appendTo('.testimonials') },3000); }); Add the following CSS: .testimonials { position: relative; } .testimonials .a { position: absolute; } This will put all the .a 's on top of one and other DEMO: http://jsfiddle.net/xXRwA/1/ undefined Use the callback function