How to display a Model Box as Rails response

I am using jquery colorbox plugin as my popup/modal dialog box solution
in my site. When I give a js response to client, I want to open a popup
modal dialog box as the response. I wrote the following code in my
response1.js.erb just to test the creation of popup box


I am getting the Javascript response correctly from server but while it
is getting executed on the browser, firebug reports error like

$.colorbox() is not a function

how else can I do the task? please help. All my related
javascripts(jquery,colorbox) are getting loaded properly when the page
loads (i checked the page source html file)

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