Jquery Mobile / Ajax Page / Script not loaded -


as write on jqm documentation, possible load page/form ajax.

by example :

<form method="post" action="mypage" data-ajax="true" id="myform">  </form> 

but when form post by, js script include in response not interpreted.

$("#mypage").live("pageinit", function() {    // }); 

this script in js file include in head part of page.

as describe on jqm faq, there solution

another approach page-specific scripting include scripts @ end of body element when no data-role=page element defined, or inside first data-role=page element. if include custom scripting way, aware these scripts execute when page loaded via ajax or regular http, if these scripts same on every page, you'll run problems. if you're including scripts way, we'd recommend enclosing page content in data-role="page" element, , placing scripts referenced on every page outside of element. scripts unique page can placed in element, ensure execute when page fetched via ajax.

i've try :

  • include js file in div (data-role="page")
  • and include js script in div (data-role="page")

but both doesn't work. solution i've found put data-ajax false...

any suggestion ? enable ajax navigation...

is .live valid method or missed in loading third-party javascript library?

better use chrome , turn on javascript console , see error.

$("#mypage").live("pageinit", function()


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -