I have followed the example at:
http://jquerymobile.com/demos/1.2.0-alpha.1/docs/pages/popup/popup-panels.html
I have managed to implement the popup and it works well, but I am new to jquery and cannot work out how to catch the click event in the buttons. I have placed the code for the popupbeforeposition: function in script tags and this works I have tried placing data-click events in the buttons mark up and adding custom code in the script tags but this never fireshow do I capture the events?
mark up:
<a href="#popupPanel" data-rel="popup" data-transition="slide" data-position-to="window" data-role="button">Open panel</a>
<div data-role="popup" id="popupPanel" data-corners="false" data-theme="none" data-shadow="false" data-tolerance="0,0">
<button data-theme="a" data-icon="back" data-mini="true">Back</but
ton>
<button data-theme="a" data-icon="grid" data-mini="true">Menu</but
ton>
<button data-theme="a" data-icon="search" data-mini="true">Search</b
utton>
</div>
<script>
$( "#popupPanel" ).on({
popupbeforeposition: function() {
var h = $( window ).height();
$( "#popupPanel" ).css( "height", h );
}
});
</script>
ASKER
Thanks for the help, should have spotted the missing ID!
Regards
Joe