My page contains many OL lists, each showing a selection of links. When each link is clicked, content slides-out to the right. When clicking through each link, the content then slides back-in, then out again.
Here's a Fiddle showing this in action:
http://jsfiddle.net/juxprose/xu3ck/15/
I would like to slow down the "back-in" part of the slide effect, so it matches the speed of the slide-out. You'll see currently it slides back-in very quickly - I'd like to adjust this speed.
Here's the JS part of the code, where the action happens:
$('.trg-open.website-title').click(function (e) {
e.stopPropagation();
$('.website-info').hide();
$(this).next('.website-info').show('slide', {direction: 'left'}, 1400);
});
Any pointers gratefully appreciated, thanks.
Try this instead of hiding it
$(document).ready(function(){
$('.trg-open.website-title').click(function (e) {
e.stopPropagation();
$('.website-info').hide('slide', {direction: 'left'}, 1400);
$(this).next('.website-info').stop().show('slide', {direction: 'left'}, 1400);
});
});
Check Fiddle
How about $('.website-info').hide(1400)
? That will hide it with exact same speed as you are showing the stuff.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With