Karthikragunath Bhavani
2010-Oct-27 04:49 UTC
Call backs not working in jquery 1.4.3 with rails 3
Hi All,
I am using rails application of version 3.0.0 and i have downloaded
jquery latest version 1.4.3 to use in my application.
However jquery conflicted with rails app so i have added noconflict
code as follows
<script>
// this allows jquery to be called along with scriptaculous and YUI
without any conflicts
// the only difference is all jquery functions should be called with
$j instead of $
// e.g. $j(''#div_id'').stuff instead of
$(''#div_id'').stuff
var $j = jQuery.noConflict();
</script>
and things started working fine but jquery call backs did not worked
and showed any error either.
So what i did is:
* removed the noconflict code
* replaced the existing rails.js with jquery based rails.js
* added the jquery.js on top of <%= javascript_include_tag :defaults
%> in application.html.erb page
then everything works fine.
I want to add jquery.js in some pages where needed and need to achieve
remote method calling and jquery callbacks. Any help would be great.
--
Posted via http://www.ruby-forum.com/.
--
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.