views:

12

answers:

0

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 box. I wrote the following code in my response1.js.erb

$.colorbox();

I am getting the 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)