Trigger expand event on collapsible-set
Description
The following code shows how to trigger expand event on collapsible-set.
Example
<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
src='http://code.jquery.com/jquery-1.6.js'></script>
<link rel="stylesheet" type="text/css"
href="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.css">
<script type='text/javascript'
src="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.js"></script>
<script type='text/javascript'>
$(window).load(function(){<!-- w w w .j a v a 2s .c o m-->
$('#search').click(function() {
$('#resultsContainer').trigger('expand');
});
});
</script>
</head>
<body>
<div data-role="page" id="home" class="type-home">
<div data-role="content">
<div data-role="collapsible-set">
<div id="filterContainer" data-role="collapsible"
data-collapsed="false">
<h3>Filters</h3>
<p>controls to pick options</p>
<a href="#" data-role="button" id="search">Search</a>
<!-- <input type="button" value="Search" id="search"/> -->
</div>
<div id="resultsContainer" data-role="collapsible"
data-collapsed="true">
<h3>Results</h3>
<p>list of results</p>
</div>
</div>
</body>
</html>