Search code examples
cssruby-on-rails-3jquery-mobilejqtouch

Rails 3 app not accessing jqtouch js and css files


My app doesn't seem to be accessing the js and css files for jqtouch.

in my layout file:

<%= javascript_include_tag "/jqtouch/src/lib/jquery-1.7.js", "/jqtouch/src/jqtouch-jquery.js", "mobile" %>
<%= stylesheet_link_tag "/jqtouch/css/jqt.css", "/jqtouch/themes/css/jqtouch.css" %>
<%= csrf_meta_tag %>

file locations: (added downloaded jqtouch-1.0-b4-rc directory to public without changing any file locations and then renamed the directory to jqtouch)

public/jqtouch/src/lib/jquery-1.7.js
public/jqtouch/src/jqtouch-jquery.js
public/javascripts/mobile.js

public/jqtouch/css/jqt.css
public/jqtouch/themes/css/jqtouch.css

in public/javascripts/mobile.js file:

$.jQTouch({
    statusBar: 'yellow'
});

in my index.mobile.erb file:

<ul>
    <li class="arrow">blah blah</li>
    <li class="arrow">yada yada</li>
    <li class="arrow">foo blarney</li>
</ul>

my understanding is that with the above configuration the page should be rendered like an iPhone app. it's not.

thanks for your help.

UPDATE: I tried using jquery mobile. I placed the js file in public/javascripts and the css file in public/stylesheets and everything worked. I placed the jqtouch js and css files similarly and got rid of all the bloat but it still did not work. My answer may be to just switch to jquery mobile.


Solution

  • It has been a while and no answers. I've put enough time into this and have decided to move on to jquery mobile.