Sending explicit js to browser from RJS


#1

I am using jQuery with the rails defaults in my app and would like to
call jQuery commands from my RJS templates or from respond_to blocks.
I’ve seen this used in a railscast:

page << “jQuery(‘some_id’).css(‘color’,‘red’);”

but I’d like it to execute with the others, namely:

page.visual_effect :highlight, ‘some_id’
page << “jQuery(‘some_id’).css(‘color’,‘red’);”

Am I going about this the wrong way, or should this be working?