jQuery Mobile pageinit/pagecreate not firing

后端 未结 7 1888
栀梦
栀梦 2020-12-05 05:24

I have 5 pages - for ease lets say:

  • one.html
  • two.html
  • three.html
  • four.html
  • five.html

When I load each indivi

相关标签:
7条回答
  • 2020-12-05 06:11

    If it is an ajax request to this page, the script should be written into body or else it doen't work at all for ajax.

    <!DOCTYPE html>
    <html>
      <head>
    ..........
      </head>
      <body>
        <div data-role="page" data-control-title="Detail" id="self_edit_page" data-theme="e">
    ...........
      </div>
      <script type="text/javascript" language="javascript" >
      $('#self_edit_page').bind("pagebeforeshow",function(event)
    .......
      </script>
       </div>
      </body>
    </html>
    
    0 讨论(0)
提交回复
热议问题