JQueryMobile data binding options

I went through a basic jQueryMobile tutorial and would like to know -
what are the different data binding options available for jQueryMobile?

I searched and found only knockouts as a result - is
this the only way to go or can I bind controls generally for normal html controls?

Basically I want to use jQueryMobile with MVC 4 and bind controls with JSON.

Please guide.

+3


source to share


1 answer


You should be able to handle a mobile jquery site built with MVC just like any other MVC application. You may run into problems with jqm based ajax navigation, but this can be disabled with data-ajax="false"

.

http://jquerymobile.com/test/docs/forms/forms-sample.html

You can also make this change globally: "jQuery Mobile will automatically handle links and forms with Ajax if possible. If false, it will also disable hash listening on URLs and load URLs as normal HTTP -requests ".



$(document).bind("mobileinit", function(){
  $.mobile.ajaxEnabled = false;
});

      

http://jquerymobile.com/test/docs/api/globalconfig.html

In the end, ajax based navigation is all about performance. If you want to use generic asp.net MVC, you have to weigh these tradeoffs.

0


source







All Articles