Kohana 2 jQtouch Jquery
尝试使用 jQtouch 将一些数据从 mysql 加载到下一个屏幕中。这样做的正确方法是什么。现在我只是在下一页的标签上有一个 jquery click 事件,它实际上只是同一页面上的一个 div 。 jquery 看起来像这样。
$.post("/mobile/getCities", {}, function(data){ loadURL($(this).attr('href'), "#findyourhome"); });
this调用命中控制器并提取数据。获得数据后,我将其设置为控制器内的视图变量。我认为问题在于索引函数再次以这种方式被击中,因此视图变量永远不会被正确设置。
Trying to load some data from mysql into the next screen using jQtouch. What is the correct way of doing this. Right now I just have a jquery click event on the tag for the next page which really is just a div on the same page. The jquery looks like this.
$.post("/mobile/getCities", {}, function(data){ loadURL($(this).attr('href'), "#findyourhome"); });
this call hits a controller and pulls the data. Once I have the data I am setting it to a view-variable inside the controller. I think the issue was the fact that the index function gets hit again this way so the view variable never properly gets set.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
虽然不是真正的答案?
你刚刚开始吗?
在这种情况下,我可能建议看看 jQuery Mobile...
http://jquerymobile.com/
看起来像 jQuery移动业务正在取得良好的开端。
http ://www.google.com/trends?q=jquery+mobile%2C+jqtouch&ctab=0&geo=all&date=all&sort=0
但是,如果您的工作与 jQtouch 相关.. .我不知道...
你也可以尝试sencha tocuh。他们尝试出售它,但我认为现在它或多或少是免费的。
http://www.sencha.com/products/touch/
听起来并不悲观,我只是最近 jQtouch 社区没有看到太多动力。
Although not really an answer?
Are you just starting out?
In that case might I suggest taking a look at jQuery Mobile...
http://jquerymobile.com/
Seems like jQuery Mobile is making a strong start.
http://www.google.com/trends?q=jquery+mobile%2C+jqtouch&ctab=0&geo=all&date=all&sort=0
However if your work is tied to jQtouch... I have no clue...
You could also maybe try sencha tocuh. They tried selling it but now it's more or less free I think.
http://www.sencha.com/products/touch/
Not to sound pessimistic, I just don't see too much momentum from the jQtouch community lately.