Zachary,
This is over my head.
a) What does the :javascript do? Where is it documented?
b) What's a jquery listener? I have googled "jQuery listener" and a lot of
stuff comes up. I need an introduction/overview.
Speaking of which, is there a good introduction to javascript for programmers?
Same for jQuery.
Thanks!
Ralph
Friday, December 30, 2011, 3:14:35 PM, you wrote:
ZS> Put `= javascript_include_tag 'accordion.js'` outside your jquery listeners:
ZS> _my_partial.haml
ZS> = javascript_include_tag 'accordion'
ZS> :javascript
ZS> (function($) {
ZS> // jquery listeners here
ZS> })(jQuery);
ZS> On Fri, Dec 30, 2011 at 2:21 PM, Ralph Shnelvar <[email protected]> wrote:
>> 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 http://docs.jquery.com/Using_jQuery_with_Other_Libraries. 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'
>> })(jQuery);
>>
>>
>> The rendered output is
>> (function($) {
>> <script src="/assets/accordion.js?body=1" type="text/javascript"></script>
>> })(jQuery);
>>
>>
>>
>> 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 [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> For more options, visit this group at
>> http://groups.google.com/group/rubyonrails-talk?hl=en.
>>
--
Best regards,
Ralph mailto:[email protected]
--
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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.