Using show/hide with 'slide' effect, how to start/stop sliding at an offset?
I have a menu that opens up on
$('.my_menu').show('slide', {direction:'up'}, 500, function() {}, function() {});
and closes on
$('.my_menu').hide('slide', {direction:'up'}, 200, function() {}, function() {});
Now, when it closes I don't want the menu to go all the way back to hidden, I would like to see par开发者_JAVA百科ts of the menu as to give a visual hint that there's actually something there.
Is there an offset option to the show/hide command?
/T
have you tried:
var height = $('.my_menu').outerHeight() - 4; // show 4 pixels
$('.my_menu').hide('slide', {direction:'up', distance: height}, 200, function() {}, function() {});
(take a look at effects.slide.js)
精彩评论