/ / pageinit nie wywołuje, w jquery - javascript, jquery, html, ajax, jquery-mobile

pageinit nie wywołuje w jquery - javascript, jquery, html, ajax, jquery-mobile

ja używam Zdalne autouzupełnianie przykład jQuery Mobile, mam zaimplementowany kod i jest poniżej

skrypt jest poniżej

   <meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0b2/jquery.mobile-1.0b2.min.css" />
<link rel="stylesheet" href="assets/css/styles.css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/mobile/1.0b2/jquery.mobile-1.0b2.min.js"></script>

<script>
$( document ).on( "pageinit", "#myPage", function() {
alert("MOBILE");
});
</script>

kod HTML jest poniżej

     <div data-role="page">
<ul id="autocomplete" data-role="listview" data-inset="true" data-filter="true" data-filter-placeholder="Search Text..." data-filter-theme="d">
</ul>

tutaj problemem jest to, że nie nadchodzi alarm, czy ktoś może mi pomóc, jak to zrobić?

Odpowiedzi:

-1 dla odpowiedzi nr 1

najpierw dołącz plik jquery, a następnie dodaj kod jak poniżej

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="http://jquerymobile.com/demos/1.2.1/js/jquery.mobile-1.2.1.js">
<script>
$(document).bind("pageinit", "#myPage", function() {
alert("MOBILE");
});
</script>