0

What does this code do?

$(":mobile-pagecontainer").pagecontainer("load", "#welcome2");

I have a jQuery UI autocomplete input box which I initialize, but it only works if any of the following is true:

  • I call load on the fragment.
  • The visitor starts on #welcome2 (rather than coming from #welcome1)

I don't understand what load does or why I need it.

EDIT: Could it be something with the order in which jQuery UI and jQuery mobile are loaded?

EDIT2: It seems no widgets on not-loaded fragment are initialized. I can't even do things like .checkboxradio("disable") unless the fragment has been explicitly loaded. what does loading mean and why isn't it done when the document is loaded?

Jayen
  • 5,653
  • 2
  • 44
  • 65
  • [`pagecontainer()`](http://api.jquerymobile.com/pagecontainer/) – BeNdErR Jul 27 '14 at 00:40
  • `load` is used to load external pages into DOM via Ajax. http://jqmtricks.wordpress.com/2014/05/23/jquery-mobile-page-events-extra/ – Omar Jul 27 '14 at 20:37
  • But there's nothing external about the fragments. Maybe i have a different definition of external. – Jayen Jul 27 '14 at 22:39

0 Answers0