views:

37

answers:

2

Greetings,

I'm using IPBoard CMS that comes with prototype and I use the latest jQuery.

I've implemented a jQuery gallery picture viewer: - It works fine on Chrome and Firefox. - I have troubles with Opera and IE 8.

I've created a minimal example here: http://www.warriorlabs.net/index.php?app=ccs&module=pages&section=pages&folder=&id=22

You just have to click on the picture.

In IE 8 or Opera:

When I remove prototype everything works fine.

When I keep prototype with jQuery altogether with my "noConflicted" gallery viewer there seems to be errors with the width and height returned by jQuery accessors. As a result the loading box is not centered and the picture itself seems to be mapped to the whole window.

Has anyone got a clue of why this is happening ?

A little help would be appreciated.

Thank you.

Benjamin Arnaud.

+1  A: 
Dan Manastireanu
Hey Dan, I've applied your fix to the page. So far I have the same issue though. Do you still have the error ?
Benjamin Arnaud
Try to also remove the `jQuery.noConflict()` from the first line in `facebox.js`
Dan Manastireanu
Tried this. It does not change anything probably because facebox is written with jQuery not protoype. Indeed in my example prototype is never "used" it's just there :). So I think prototype is corrupting jQuery or something, probably not the opposite.
Benjamin Arnaud
Perhaps ... in this case you might try to move the `prototype.js` script at the top of the head tag. It might also be the case that prototype modifies the actual prototype of HTMLElement in such a way that it messes up the objects/functions jQuery expects.
Dan Manastireanu
Maybe somebody else can help you, because I have very little experience with prototype ... sorry
Dan Manastireanu
No problem, I've already used prototype altogether with jQuery + noConflict. I think I'm facing something really specific here. Kind of like this : http://forum.jquery.com/topic/ie-jquery-and-prototype-conflict
Benjamin Arnaud
Looks like you are on the right track ... perhaps you might be able to make it work by doing something like `Element.scrollTo=undefined;` right at the beginning of `facebox.js`. Of course this might break prototype code that relies on it ...
Dan Manastireanu