my target slideToggle() div needs to be display:inline-block
instead of display:block
when it's open. Is there a way to change the jquery behavior here?
Edit:
i'm using jQuery 1.7.0 at the moment. Also, the <div>
is initially at display:none
and should expand to display:inline-block
after a click on a link; but apparently the default state for slideToggle() in this situation is display:block
...
$('#my-block').slideToggle('medium', function() { if ($(this).is(':visible')) $('this').css('display','inline-block'); });
Minor edit. – Enjambement