Git Product home page Git Product logo

jquery-rails's Introduction

jquery-rails

jQuery! For Rails! So great.

This gem provides:

  • jQuery 1, 2 and 3
  • the jQuery UJS adapter
  • assert_select_jquery to test jQuery responses in Ruby tests

Versions

Starting with v2.1, the jquery-rails gem follows these version guidelines to provide more control over your app's jQuery version from your Gemfile:

patch version bump = updates to jquery-ujs, jquery-rails, and patch-level updates to jQuery
minor version bump = minor-level updates to jQuery
major version bump = major-level updates to jQuery and updates to Rails which may be backwards-incompatible

See VERSIONS.md to see which versions of jquery-rails bundle which versions of jQuery.

Installation

Add

gem 'jquery-rails'

to your Gemfile.

The jquery and jquery-ujs files will be added to the asset pipeline and available for you to use. If they're not already in app/assets/javascripts/application.js by default, add these lines:

//= require jquery
//= require jquery_ujs

If you are running Rails 5.1 and up, and if you have included //= require rails-ujs, then jquery_ujs is not needed anymore. You can just add:

//= require jquery

If you want to use jQuery 2, you can require jquery2 instead:

//= require jquery2
//= require jquery_ujs

And if you want to use jQuery 3, you can require jquery3:

//= require jquery3
//= require jquery_ujs

For jQuery UI, we recommend the jquery-ui-rails gem, as it includes the jquery-ui css and allows easier customization.

As of v3.0, jquery-rails no longer includes jQuery UI. Use the jquery-ui-rails gem above.

Contributing to jquery-rails

jquery-rails is work of many contributors. You're encouraged to submit pull requests, propose features and discuss issues.

  • If it's an issue pertaining to the jquery-ujs javascript, please report it to the jquery-ujs project.

  • If the jQuery scripts are outdated (i.e. maybe a new version of jquery was released yesterday), feel free to open an issue and prod us to get that thing updated. However, for security reasons, we won't be accepting pull requests with updated jQuery scripts.

See CONTRIBUTING.

License

jquery-rails is released under the MIT License.

Acknowledgements

Many thanks are due to all of the jquery-rails contributors. Special thanks to JangoSteve for tirelessly answering questions and accepting patches, and the Rails Core Team for making jquery-rails an official part of Rails 3.1.

jquery-rails's People

Contributors

ai avatar amatsuda avatar andrewhaines avatar benpickles avatar bquorning avatar cannikin avatar carlosantoniodasilva avatar chancancode avatar csommerauer avatar digitalpardoe avatar dy-dx avatar francocatena avatar fudoshiki avatar georgeclaghorn avatar gtd avatar guilleiguaran avatar indirect avatar jangosteve avatar jeremy avatar joliss avatar josevalim avatar juank-pa avatar kaspth avatar lucasmazza avatar mrhead avatar rafaelfranca avatar robertd avatar robertomiranda avatar snowyote avatar thegcat avatar

Watchers

 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.