View Full Version : sagscroller conflict with lightbox...how do I fix?

06-22-2011, 03:07 PM
1) Script Title:
sagscroller (automatic scroller): http://www.dynamicdrive.com/dynamicindex2/sagscroller.htm
Updated to 2.04 as was recomended on this forum.
(http://home.comcast.net/~jscheuer1/s...htbox2.04a.zip )
2) Script URL (on DD): see above

3) Describe problem:

I'm at my wits and with this (been searching and trying out for 2 days now to get all 3 working)

I first had the problem of the lightbox fade fading everything but css menu and sagscroller. Finally got that to work (z-index of lightbox and overlay both need to be 1000 -ish)...was in a cheering mood when I saw my sagscroller didnt scroll....

So...I decided to look here for the answers and saw some good tips so tried them (other versions of lightbox and other apps like lightbox such as slimbox) But it didnt give any solution...sadly....or I did something wrong...

( http://www.dynamicdrive.com/forums/showpost.php?p=163470&postcount=1 )

I saw a bit of code to be replaced by another code in tje lightbox.js file so there is no onload conflict and I think that could well be the problem.
But I seem to not have the particular code in the .js file which needs to be replaced and as I am by no means up to speed on js I really do not know what piece of my .js file to replace it with. :confused:
Ofcourse now that I want to add that piece of coding to let you know what I meen I can't find it anymore.. It was posted by jscheuer1

Could someone please help me cause this has been taken up almost 2 days of searching now.. And thats time I really dont have atm.
I like being on the internet but this is getting absurd :D

All is working fine...till I put them in to one page.
If I place the sagscroller header code at the bottom of the header the sagscroller works but the lightbox is not (images open in a new page)
If I place the lightbox header code on the bottom of the header the lightbox works but the sagscroller stops scrolling (but is showing the first 3 images loaded from a textfile...)

Think they are both having a go with the onload but how to fix this....

Thanks in advance from a very tired me.

06-23-2011, 02:58 AM
Slimbox 2.04 (http://www.digitalia.be/software/slimbox2) would be a good fit for this. Make sure to install it correctly and get rid of all of the lightbox files. If items in the scroller are lightbox links, you may need different code to replace the "AUTOLOAD CODE BLOCK" of Slimbox, like:

// Live invocation for use with other scripts, image maps, AJAX, etc. - also skips duplicates when forming groups
// Uses the rev attribute of the tag for a caption, freeing up the title for other uses or to be blank.
// Remove the AUTOLOAD CODE BLOCK if using this, or replace it with this code.
// Live Load Script (c)2011 John Davenport Scheuer - for use with Slimbox 2.04
// as first seen in http://www.dynamicdrive.com/forums/
// username: jscheuer1 - This Notice Must Remain for Legal Use
if (!/android|iphone|ipod|series60|symbian|windows ce|blackberry/i.test(navigator.userAgent)) {
$('*[href][rel^=lightbox]').live('click', function(e){
var t = this, rel = t.getAttribute('rel'), hrefs = [], links = [], index;
if(rel === 'lightbox'){
$.slimbox(t.href, t.getAttribute('rev') || '', { /* Options */ });
} else {
$('*[href][rel="' + rel + '"]').each(function(){
if($.inArray(this.href, hrefs) < 0){
if(t.href === this.href){index = hrefs.length;}
links.push([this.href, this.getAttribute('rev') || '']);
$.slimbox(links, index, {loop: true /* , Aditional Options */ });

And should use only one copy of jQuery for the page. Version 1.52 would be good.

Considering your post, this may be a bit much to take in at once. If you have a page up somewhere or can put one up, it doesn't have to work - just give a good idea of what you're going for, post a link to it and I'll see what can be done with it.

06-23-2011, 06:33 AM
Hi John,


You know what...I think I was just to tired yesterday cause today I looked at my files again to install the slimbox2 you suggested and ...what a mess I had made of things!
I think I have been going at it way to long yesterday to see what I was doing in the end.
Anyway, I did what you said I should......it worked!

One thing I just need to ask even tho things are working now.
My menu uses jquery version 1.4.2 and the lightbox version 1.4

Should I still change them both to 1.52? Or best keep it like this ("why fix something if it aint broken")
And if I should change...can I just change the numbers in the source code or... (almost sounds to easy!)

Ok i'm off to install the slimbox2 to all 7 galleries!

Thanks again!

06-23-2011, 01:15 PM
I'm not sure what you mean by:

My menu uses jquery version 1.4.2 and the lightbox version 1.4

If you mean Slimbox uses 1.4, then yes. I tell you what, make a backup of the page just in case. Change the first instance of jQuery on the page to:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>

Get rid of any other jQuery external script tags. But you didn't say which menu script you were using. If it has this in it:


That might need to be removed.

I could be more specific if I had a link to the page. Try it. If it works it will be more efficient and more future proof. If not - you have your backup and you can give me a link to the non-working version for troubleshooting.

06-29-2011, 07:18 AM
Sorry it took me a bit to get back here.

I tried changing the version to 1.5.2 and the sagscroller was the first with jquery so he was the lucky one to have his version changed.
Oh btw it was the sagscroller that uses 1.4.2 not the menu (sorry!)
Now my sagscroller did not like this change one bit and doesnt do anything anymore. But my slimbox is all fine with the change.
I sorta expected this to be the other way around :rolleyes:
the noconflict..I couldnt find it in the sagscroller. Or did I need to find it in the slimbox now that its the slimbox whos external link I deleted?

uploaded the testpage here (http://sparkadoodle.nl/jquery%20version/test.html)

Slimbox already used 1.5.2

thanks again!

06-29-2011, 12:34 PM
There could also be other problems but all of the images in sparkadoodle.nl/jquery version/sagcontent.txt are 404 Not Found.

Fix that and see what happens. There doesn't appear to be any script error. None of the scripts are using jQuery.noConflict(), and the menu doesn't appear to even be a script, just css.

06-30-2011, 05:49 AM
Oh stupid me forgot to load the content to the server :eek: :o

And I loaded them and the scroller worked...argh.
It didnt work local as it did before the version change so I asumed...theres where I went wrong!
Ok you can slap me around with a big book of jquery now... :D

sorry for the waste of time and thanks for the patients!