[Rails] jQuery Mobile (mobile_button_to) helper
For those of you who use jQuery Mobile with Rails, I created a method
called mobile_button_to which allows you to customize and use any or all
options with a jQuery button.
The gist for the helper is located here, along with a brief example of
how to use it:
https://gist.github.com/1982942
It acts as a normal link_to which accepts the name, and href (or #id),
followed by as many options as you'd like to use:
:role, :icon, :mini, :inline, :theme, :rel, etc.
The idea was to minimize code length, make it more readable, and
maintain a consistent rails presence when using buttons. If anyone has
similar helpers that you've created with jQuery Mobile, please feel free
to add them.
Thanks,
JD
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home