How to execute custom javascript code inside an rjs template

I’d like to execute a piece of javascript code, for example
funcion f1() {

in an rjs template

“page[:ticket_being_deleted].visual_effect :fade” I know this executes
some javascript, but is there a way that instead of this javascript
code, I execute f1 function?

Thanks in advance,
Marko Vuksanovic.

There’s an example for that here:,
in the screencast but also in the piece of code on the webpage.


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs