Set slide time for collapsible
Description
The following code shows how to set slide time for collapsible.
Example
<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
src='http://code.jquery.com/jquery-1.6.4.js'></script>
<link rel="stylesheet" type="text/css"
href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css">
<script type='text/javascript'
src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"></script>
</head><!-- ww w . j ava2s .c o m-->
<body>
<div data-role="page">
<div data-role="content">
<div data-role="collapsible" id="my-collaspible">
<h3>My Title</h3>
<p>My Body</p>
</div>
<p>something else</p>
</div>
</div>
<script type='text/javascript'>
$('#my-collaspible').bind('expand', function () {
$(this).children().slideDown(1000);
}).bind('collapse', function () {
$(this).children().next().slideUp(1000);
});
</script>
</body>
</html>