PDA

View Full Version : want to use light box and verticalscroll in same programs



vikaspa
06-08-2012, 05:22 AM
Problem when I use
light box and vertical scroll in same program

refer
http://webvikas.net.in/parag/gallery1.php

The scroll is seen but not working

click on image displays the image in POP up box
this means lightbox is working


what i found is if i remove
<script type="text/javascript" src="slidejs/prototype.js"></script>
from this program

I have generated other program by removing above script i.e.

http://webvikas.net.in/parag/gallery1scroll.php#

(in short gallery1scroll.php program is copy of gallery1.php except it donot have slidejs/prototype.js)

i noticed that scroll works fine
but the light box doesn't work

Please help me to resolve this issue
I want both to work ...
light box as well as vertical scroll....


all necessary files are attached

jscheuer1
06-08-2012, 10:52 AM
That's a pretty sloppy looking page. Here's a somewhat cleaned up version of it:

4475

that has both scripts working.

Once the page is in its proper location, you may remove the:


<base href="http://webvikas.net.in/parag/" />

tag.

Mostly what was done was to reorder things so that there is only one copy of jQuery in use - one (v1.4.4) apparently compatible with all of the jQuery scripts on the page. All scripts were placed in the head, after all styles. The jQuery script was first after the styles and put into noConflict mode so that prototype/scriptaculous could non-destructively take over the use of the $ variable later after the scripts that use jQuery. Some of the jQuery code on the page had to be made noConflict compatible, the external jQuery scripts thankfully already were. There was some code removed as it wasn't being used as far as I can tell and was throwing a non-fatal error. I question whether or not the stmenu.js is being used. I couldn't see where. It throws a non-fatal error in IE 8 via its fetching of the stcode.js file. If it (the stmenu.js and its associated code) could be removed, that would be good, but I left it in there just in case it was used.