在haml,sass和coffeescript中使用Rails 3.2.0: 基本上我試圖禁用jQuery_Mobile加載ajax頁面,而不必在任何視圖中包含javascript buch。在// = require require之前執行javascript
我嘗試這樣做:
13 //= require jquery¬
14 //= require jquery_ujs¬
15 //= require_tree .¬
16 $(document).bind("mobileinit", function() {¬
17 $.mobile.ajaxEnabled = false;¬
18 });¬
19 //= require jquery_mobile¬
沒有成功,我不完全理解事件鏈時= javascript_include_tag "application"¬
叫什麼// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD GO AFTER THE REQUIRES BELOW.¬
手段?