Knockout.js and Jquery Mobile
Knockout.js and Jquery Mobile
我有一个Jquery Mobile和phonegap应用程序。我使用:
Jquery Mobile (1.3.1)
jquery (1.9.1)
Phonegap (2.8.0)
我被要求在应用程序中使用knockout.js。我对knockout.js
完全陌生,我仍在努力了解它是如何工作的。
我将不得不发送ajax请求与JSON
数据和响应将是JSON
对象。我曾经使用for循环来处理JSON对象,一切都很好。我只是有点担心如何让这一切与knockout.js一起工作。
有谁能给我一些关于如何使用这个新的knockout.js的建议吗?我有非常有限的时间(大约1周)来了解如何使所有这些工作。
或者你建议坚持我们所知道的并使用jquery和jquery移动版
http://knockoutjs.com/documentation/json-data.html
Knockout并不强制您使用任何一种特定的技术来加载或保存数据。你可以使用你通常使用的
$.getJSON("/some/url", function(data) {
// Now use this data to update your view models,
// and Knockout will update your UI automatically
})
var data = /* Your data in JSON format - see below */;
$.post("/some/url", data, function(returnedData) {
// This callback is executed if the post was successful
})
相关文章:
- 无法从jquery Mobile导航栏重定向到另一个页面
- jquery mobile上多个页面上的一个表单
- window.location使用jquery mobile实现chrome跳转
- 防止jQuery Mobile中的ajax缓存
- 如何在JQUERY Mobile上放置谷歌地图
- JQuery Mobile Javascript复杂方程式
- jQuery Mobile Undefined不是一个函数
- jQuery mobile not going through ID
- 如何使用javascript或jquery mobile从url读取和显示XML文件
- jQuery Mobile Collapse上的AJAX请求
- 应用程序在呈现Jquery Mobile之前显示无样式的Html
- 如何在jQuery Mobile 1.4 Datepicker中创建事件
- UIWebview赢得't通过基本身份验证加载动态加载的资源(通过jQuery mobile)
- jQuery Mobile到其他页面的锚链接不起作用
- 如何在jQuery Mobile中设置100%宽度的输入类型日期
- JQuery Mobile破坏了我的布局:如何禁用自动打字
- 防止用户在jQuery Mobile中ajax加载页面时单击其他位置
- 根据手机上是否存在文件,在jQuery mobile中动态填充列表视图
- Image Sprites和jQuery Mobile Ajax导航的问题
- Mixing JQuery Mobile & JQuery UI