I have collapsible content, and would like to add a link that can be clicked besides the actual toggling function of the header.
[edit]Thanks to /frequent/, I am pretty close, the link "on" the header is working, but I am missing the css to get the link inside the header - just can't figure it out:
<html>
<body>
<script type="text/javascript" charset="utf-8">
$( document ).on('pageinit','#page1', function (event) {
$(".click_action").bind("click", function (e) {
e.stopPropagation();
e.preventDefault();
e.stopImmediatePropagation();
$.mobile.changePage($(this).attr('href'));
});
});
</script>
<div data-role="page" id="page1">
<div data-role="collapsible" class="ui-collapsible ui-collapsible-inset ui-corner-all ui-collapsible-themed-content ui-collapsible-collapsed doublemeaning" data-enhanced="true">
<h3 class="ui-collapsible-heading ui-collapsible-heading-collapsed">
<a class="myheading ui-collapsible-heading-toggle ui-btn ui-btn-icon-left ui-icon-plus" href="#">Heading</a>
<a class="click_action" href="test2.html">Go to test2.html</a>
</h3>
<div class="ui-collapsible-content ui-body-inherit ui-collapsible-content-collapsed" aria-hidden="true">
<p>I'm the collapsible content. Open me!</p>
</div>
</div>
</body>
</html>
See http://jsfiddle.net/XqAvB/1/ Any ideas are very much appreciated.