Question

I am running Ruby on Rails 3 and I would like to use Prototip in order to show tooltips and put in those some partial view. My problem is that I don't know if it is possible to use Prototip like I use Prototype in RJS templates.

If it is possible, how to do that? Otherwise, in general, how to use Prototip with Ruby on Rails? A real example is appreciated ;-).

BTW: There may be conflicts using simultaneously Prototip, Prototype and Ruby on Rails?

P.S.: If you know another software that does the same as Prototip, do not hesitate to tell me!

Was it helpful?

Solution

Ruby on Rails doesn't have anything to do with Prototip. Prototip use the Prototype javascript framework, so no, there won't be any conflicts.

I don't really see why you would want to call Prototip in your rjs templace, but if Prototype and Prototip are included in the page, you should be able to call

new Tip(element, 'content', {
    ....
});

in your rjs.

By the way, Prototip isn't free... I would be really surprised if you could not find a free one.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top