stackoverflow.com/questions/15377367/using-sinatra-and-jquery-without-redirecting-on-post
stackoverflow.com/questions/14933685/sinatra-javascript-call
stackoverflow.com/questions/4857374/ruby-w-sinatra-what-is-the-equivalent-of-a-js-erb-from-rails
stackoverflow.com/questions/4856002/ruby-w-sinatra-could-i-have-an-example-of-a-jquery-ajax-request
其实只要一个rails.js
https://github.com/rails/jquery-ujs

ref:
1.http://code.jquery.com/jquery-1.11.1.min.js
2.https://github.com/rails/jquery-ujs/blob/master/src/rails.js#L34
本文探讨了如何在Sinatra框架中使用jQuery实现无刷新页面更新。通过几个具体实例介绍了如何发送AJAX请求并处理响应,同时提供了Rails.js库作为辅助资源。
550

被折叠的 条评论
为什么被折叠?



