View Full Version : Overlapping Javascript

02-10-2012, 04:16 AM

I am attempting a page that has two javascript components:

Rotating Header Images
I found Infinite Rotating Images Using jQuery (http://trendmedia.com/news/infinite-rotating-images-using-jquery-javascript/)

Lightbox - Photo Viewing (http://lokeshdhakar.com/projects/lightbox2/)

Each component works fine when presented alone on the page. However, when they are both called - only one works; and that is whichever is presented later in the HTML.

Is there any way for me to make these work in harmony with one another or can I somehow combine these? I am not able to identify what is overlapping.

Here is a sample of the issue: EBC (http://ephraim-doorcounty.com/parks/harborside.htm)
As you can see -the rotating header images work - but Lightbox for the images below does not.

Any help is greatly appreciated!

02-10-2012, 09:06 PM
the issue is not with the components, but the frameworks they extend. prototype and jQuery don't play nice. You should find plugins that serve your purpose with the same framework. after all, why load two complete frameworks each for just one script? but if you insist, there is a fix for jQuery buried somewhere in it's extensive documentation to allow it to work with other libraries that also use the $ symbol, you should post your question the jQuery forum for more advanced help.

02-10-2012, 09:50 PM
read the link inmy sig referring to using jquery with other libraries. it will shwo you what to do