I want to add a slideDown
or slideUp
effect to a div
with data-role='collapsible'
, so it will not open at once but gradually.
I have tried this:
$('#my-collapsible').live('expand', function() {
$('#my-collapsible .ui-collapsible-content').slideDown(2000);
});
$('#my-collapsible').live('collapse', function() {
$('#my-collapsible .ui-collapsible-content').slideUp(2000);
});
But it still opens and closes without delay.
Anyone knows how should I call those slideDown
and slideUp
methods?