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.
$('.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
Post a Comment