Coder Social home page Coder Social logo

jquery-mobile-rails's Introduction

Jquery Mobile for Rails

This gem adds the JQuery Mobile files to the rails assets pipeline.

Gem’s JQuery Mobile Version

1.2.0

Instalation

Add this gem to your Gemfile:

gem 'jquery_mobile_rails'

This will include to your assets pipeline the jquery mobile’s javascripts, stylesheets and images.

Insert into your application.js manifest the jquery.mobile (or jquery.mobile.min)

//= require jquery
//= require jquery_ujs
//= require jquery.mobile

And the same to your application.css manifest:

*= require_self
*= require_tree .
*= require jquery.mobile

Use

I built this gem for using with the Mobylette gem, but it will work with your stand alone application, or with any other gem that filters your mobile requests.

For layouting using JQuery Mobile, and using all its features, I suggest your give a look at their documentation: jquerymobile.com/test/

Example

Inside the test/dummy there is a simple application using a very basic jquery mobile templating.

Different versions

By default, jquery_mobile_rails gem will provide latest stable version of JQM. Besides that you can switch to other versions by selecting a different branch.

For example, to use 1.2.0-alpha.1, update your Gemfile to:

gem "jquery_mobile_rails", git: "git://github.com/tscolari/jquery-mobile-rails.git", branch: "1.2.0-alpha.1"

Pull Requests

Please, this steps help a lot the merge proccess:

  • Copy jquery mobile files to vendor/assets/(javascripts|stylesheets|images)/

  • Remove version number from the file names

  • place images in the sub-directory named ‘jquery-mobile’ (vendor/assets/images/jquery-mobile)

  • run the rake task ‘jquery_mobile_rails_css_fix`. This will ensure that the images in the css will be loaded using `image-url()` instead of `url()`, and it will convert the file to scss.

:)

References

jquery-mobile-rails's People

Contributors

rds avatar tscolari avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.