views:

60

answers:

1

I'm currently using the facebox_render plugin for rails, and am trying to get it working without jquery (so using prototype). I've got it 99% functional, but there's one line I'm having difficulty with.

how would I write the following using prototype?

link_to_function(name, "jQuery.facebox(function(){ #{remote_function(options)} })", html_options || options.delete(:html))

I'm not familiar with prototype, so chances are there's a really simple solution :P

It's the jQuery.facebox(function() ... ) bit that's causing me grief.

+1  A: 

Facebox is a plugin that depends on jQuery. That is, it depends on jQuery being loaded to work. To use Facebox, you need to load jQuery.

Try using the PrototypeJS port of Facebox, see: Porting Facebox from jQuery to Prototype

artlung
My question probably wasn't clear enough. I know that facebox depends on jquery. I already ported Facebox to prototype. What I'm looking for help doing is porting the Facebox_render_helper's "facebox_link_to" functionality from jquery to prototype
Maximus