jQueryMobile Data Binding options

Go To StackoverFlow.com

3

I was going through some basic tutorial on jQueryMobile and would like to know -
what are the different databinding options available for jQueryMobile?

I searched and as a result found only knockoutjs -
Is it the only way to go or can I bind the controls like we generally do for normal html controls?

Essentially, I want to use jQueryMobile with MVC 4 and bind the controls with JSON.

Please guide.

2012-04-04 23:29
by iniki
Check-out the jQuery Mobile twitter feed, they re-tweet some tutorials for stuff just like this - Jasper 2012-04-05 00:11
As best I can tell, jquery has no support for attaching JSON to any of the controls - Nick H 2013-05-26 17:58


0

You should be able to treat a jquery mobile site built with MVC just as you do any other MVC application. You may run into issues with jqm based ajax navigation but that can be turned off 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 link clicks and form submissions through Ajax, when possible. If false, URL hash listening will be disabled as well, and URLs will load as ordinary HTTP requests."

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

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

In the end, ajax based navigation is about performance. If you want to go with generic asp.net MVC, you will have to weigh these trade offs.

2012-10-11 20:17
by andleer
Ads