Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

..
Failed to load latest commit information.
lib
LICENSE
README
Rakefile
TODO

README

merb-jquery
===========

Makes it easy to use jQuery in your application.

$ gem install merb_jquery

Add
  require 'merb_jquery'
to your init.rb

$ rake merb:jquery:install
Installs the latest jQuery to public/javascripts

In your layout, inside <head>:

<%= jquery %>


In your views:

<% jquery do %>
  $('#foo').something();
<% end %>

jquery is a helper method is a shortcut to

throw_content :for_query and catch_content :for_jquery

You still need to inlude jQuery javascript file manually, for instance,
using merb-assets:

# in init.rb

dependency "merb-assets", "0.9.10"

# in Erb layout

<%= js_include_tag "jquery" %>

# or in Haml layout

= js_include_tag "jquery"
Something went wrong with that request. Please try again.