Redboxing with Rails: Modal Windows FTW

by barce on November 1, 2008

There’s a great lightbox plugin for Ruby on Rails called Redbox. Unfortunately, it doesn’t work out of the box, but here’s the patch for redbox.js:

Replace:

Element.setTop(window_id, boxTop);
Element.setLeft(window_id, boxLeft);

With:

$(window_id).style.top = boxTop + “px”;
$(window_id).style.left = boxLeft + “px”;

Remove or comment out:

Element.hide(‘RB_loading’);

Remove:

<div id=”RB_loading”></div>

Leave a Comment

Previous post:

Next post: