Add collapsible to listview
Description
The following code shows how to add collapsible to listview.
Example
<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script>
<link rel="stylesheet" type="text/css"
href="http://code.jquery.com/mobile/latest/jquery.mobile.min.css">
<script type='text/javascript'
src="http://code.jquery.com/mobile/latest/jquery.mobile.min.js"></script>
<script type='text/javascript'>
$(window).load(function(){<!--from w w w. ja va 2 s . c o m-->
$(function() {
$("#data").append('<div data-role="collapsible"><h3>Div2</h3><p>Content Div2...</p></div>');
$("#data").listview("refresh");
});
});
</script>
</head>
<body>
<div data-role="page">
<div data-role="content" id="data">
<div data-role="collapsible">
<h3>Div1</h3>
<p>Content Div1</p>
</div>
</div>
</div>
</body>
</html>