jquery - Slide images instead of fading in -


i've made simple image gallery images fadein thumb image clicked. trying change thumb image clicked requested gallery image doesn't fadein slides left/right.

http://jsfiddle.net/tfen4/

$('.fotos').not(':first').hide(); $('.info').not(':first').hide();  $('.gal-links ul li a').click(function() {     var activelink = $(this).attr('href');     $('.info').hide();     $('.gal-links ul li a').removeclass('active');     $(this).addclass('active');     $('.fotos').hide();     $(activelink).fadein('slow');     $('.info').fadein('slow');     return false; }); 

how should change code this? animate , positioning right way?

use jquery ui's slide effect or use animate() method width property

$(activelink).toggle( "slide" ); 

here fiddle slide effect.

for using animate method can this

$(activelink).show('slide', {direction: 'right'}, 1000); 

and hiding

$(activelink).hide('slide', {direction: 'left'}, 1000); 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -