I have been really puzzled because I was trying to work out some jQuery tutorials in coffeescript for rails 3.1 and it seems like none of the animation functions of jquery work.
For example, this does nothing:
/assets/javascripts/my_controller.js.coffee:
$(document).ready ->
$('p:first').fadeIn()
However, if I do this:
$(document).ready ->
alert($('p:first').text())
I do get the correct text. Can anyone tell me what is going on here?
THANK YOU EVERYONE, and thanks Trevor for reading my mind. Thanks Benoit for helping me to properly use the site. My final answer below.
I dug around a bit and found this: (from http://api.jquery.com/visible-selector/)
So, using the correct style, or the toggle functions in jQuery are the right option.