jQuery has a slideToggle
, and a fadeToggle
, but they don't play well together (see fiddle here):
$('div').on('click', function () {
$('span')
.slideToggle({duration: 'slow', queue: false})
.fadeToggle({duration: 'slow', queue: false});
});
How can I have slide
and fade
toggle at the same time?
jQuery has a slideToggle
, and a fadeToggle
, but they don't play well together (see fiddle here):
$('div').on('click', function () {
$('span')
.slideToggle({duration: 'slow', queue: false})
.fadeToggle({duration: 'slow', queue: false});
});
How can I have slide
and fade
toggle at the same time?
- .animate with he right options.... – mikakun Commented Feb 9, 2013 at 15:07
1 Answer
Reset to default 17Use .animate()
as follows:
$('span').animate({
height: "toggle",
opacity: "toggle"
});