Use jquery-rails gem this will solve your issue and also maintain your update related to jquery
Thanks & Regards Ankit Varshney On Mon, Jan 9, 2012 at 5:41 PM, Colin Law <[email protected]> wrote: > On 9 January 2012 12:02, Erwin <[email protected]> wrote: > > I am using the jquery-ui-1.8.16.custom.min.js lib... to toggle my > > sidebar-views > > > > ====== > > .. > > $('.toggle-view li').click(function () { > > var text = $(this).children('p'); > > if (text.is(':hidden')) { > > text.slideDown('fast'); > > $(this).children('h4').addClass('active'); > > } else { > > text.slideUp('fast'); > > $(this).children('h4').removeClass('active'); > > } > > }); > > ... > > ====== > > > > I have a strange behavior : without any pre-compilation ( rake > > assets:clean ) it runs well... toggle is good > > then I pre-compile locally my assets before deployment > > running again in development ... toggle doesn't work anymore .. it > > slideDown and slideUp immediately > > > > if I clear again the assets : rake assets:clean , then correct > > toggle behavior is good again .. > > > > what could happen when I run : bundle exec rake > > assets:precompile:all to make this happen ? > > I wonder whether you have an error in the script that behaves > differently when compiled. First run with firebug in firefox with it > not compiled and see if there are any errors. Then repeat with it > compiled. > > Colin > > -- > 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. > > -- 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.

