Hi Matt
I have an issue with JQUERY Mobile events.
I have a page 'consommation.php' with a list listview. When I display this page (from index.php containing a listview too), the event 'pagebeforeshow' doesn't occurs. It is the same for the click event when I click on options from 'consommation.php' listview. I don't have any events.
But when I enter directly the URL for 'consommation.php' in my browser (without going through index.php listview), all my events are working !!!
There is something that lock my events !! Any idea on what's wrong ?
Thanks and regards
Here is my code in 'consommation.php' :
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/MyTheme.min.css" type="text/css"/>
<link rel="stylesheet" href="
http://code.jquery.com/mobile/1.1.1/jquery.mobile.structure-1.1.1.min.css" />
<script src="
http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script>
$('div[id="consommation"]').live("pagebeforeshow", function()
{
alert("pagebeforeshow");
});
$('div[id="consommation"] ul[data-role="listview"] a').live("click", function()
{
alert("click");
var dataurl = $(this).attr("data-url");
alert(dataurl);
if (dataurl != null)
{
$.mobile.changePage("sonde_detail.php" + dataurl);
}
});
</script>
<script src="
http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.min.js"></script>