Create nested filetered listview
Description
The following code shows how to create nested filetered listview.
Example
<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
src='http://code.jquery.com/jquery-1.9.1.js'></script>
<link rel="stylesheet" type="text/css"
href="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.css">
<script type='text/javascript'
src="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.js"></script>
<script type='text/javascript'>//<![CDATA[
$(window).load(function(){<!--from w w w .j a va 2s.com-->
$("#list").on("click","li",function(){
var list = $("<ul></ul>");;
for(var i=0;i<4;i++){
list.append("<li>test</li>");
}
$(this).append(list);
$(this).trigger('create');
});
});//]]>
</script>
</head>
<body>
<div data-role="page">
<div data-role="collapsible-set" data-theme="b" data-content-theme="d">
<div data-role="collapsible">
<h3 data-position="inline">Filtered list
<h3>
<ul data-role="listview" data-divider-theme="d" id="list">
<li><a href="#">A</a></li>
<li><a href="#">B</a></li>
<li><a href="#">C</a></li>
<li><a href="#">D</a></li>
<li><a href="#">E</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</body>
</html>