I would like to specify a jquery mobile theme for an element in a rails 3.0 form. The following doesn’t work.
<div data-role="page" data-theme="a">
... #content formatted with data theme a
<div data-role="checkbox" data-theme="c">
<%= f.check_box :remember_me %>
<%= f.label :remember_me %>
</div>
... #content formatted with data them a
</div>
Thanks!
UPDATE: shanabus solution in rails format –
<%= f.label :remember_me, { 'data-theme' => 'c' } %>
In order for you to specify the theme of a checkbox in jQuery Mobile, you would have to set it directly on the checkbox element. Could be something like this:
Here is the docs for jQuery Mobile: http://jquerymobile.com/test/docs/forms/checkboxes/options.html
And for a Rails example of adding attributes to a check_box: http://apidock.com/rails/ActionView/Helpers/FormHelper/check_box
Hope this helps!