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?
display:inline-block
display:block
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 ...
<div>
display:none
A little birdie told me...
$('#my-block').slideToggle('medium', function() { if ($(this).is(':visible')) $(this).css('display','inline-block'); });
2.1m questions
2.1m answers
60 comments
57.0k users