Forum: Ruby on Rails Sending explicit js to browser from RJS

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
sa 1. (Guest)
on 2009-02-11 13:26
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?
This topic is locked and can not be replied to.