Ruby on Rails Friday, December 30, 2011

I have a library conflict between jQuery.js & accordion.js

The first line of accordion.js is

$(document).ready(function() {

Firebug displays
$(document).ready is not a function

I have read This link is an explanation of how to resolve the conflict.

To that end I have in a partial haml file

(function($) {
= javascript_include_tag 'accordion.js'

The rendered output is
(function($) {
<script src="/assets/accordion.js?body=1" type="text/javascript"></script>

but I am still getting the
$(document).ready is not a function
error message.

Is what I am trying to do even legal?

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
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment