Shadow + jquery 1.3.2

6 messages Options
Embed this post
Permalink
cverrette

Shadow + jquery 1.3.2

Reply Threaded More More options
Print post
Permalink
Hi,
I've got the following test page that's not working.
Every time I load the page up I get into a loading loop, ie the page loads forever.

If I remove the code for jquery (script link and document.ready) the page works.

As you can see I've downloaded all the code from shadow into the folder /ressources/shadowbox/ (latest version as of today - 3.0b).

Any ideas ?


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<script src="/ressources/JQuery/jquery-1.3.2.min.js" type="text/javascript"></script>
	<link href="/ressources/shadowbox/shadowbox.css" rel="stylesheet" type="text/css" />
	<script src="/ressources/shadowbox/shadowbox.js" type="text/javascript"></script>
	<script type="text/javascript">
	$(document).ready(function() {
		Shadowbox.init();
	});
	</script>
</head>
<body>
    <div>
        <a href="/documents/Page_14/Thumbs/Thumbnail1.jpg" rel="shadowbox" title="My Image">test</a>
    </div>
</body>
</html>


Thanks

edit: added shadow version
cverrette

Re: Shadow + jquery 1.3.2

Reply Threaded More More options
Print post
Permalink
I've figured what to do, I simply moved the init() outside the jquery ready function and it's now working.

Although it's working, if anyone could tell me why I'd appreciate.

Thanks
kipusoep

Re: Shadow + jquery 1.3.2

Reply Threaded More More options
Print post
Permalink
Yeah it looks like Shadowbox and jquery 1.3.2 aren't compatible with eachother...
I don't know why, but I've got exactly the same problem...
Maggie

Re: Shadow + jquery 1.3.2

Reply Threaded More More options
Print post
Permalink
Hey it's working putting init() outside JQuery. But still video format like .swf, .flv are nor working. It is giving me an error swfobject undefined. Is any video format working with your code?
mjijackson

Re: Shadow + jquery 1.3.2

Reply Threaded More More options
Print post
Permalink
In reply to this post by cverrette
The call to Shadowbox.init should be outside of the $(document).ready callback. This is because Shadowbox registers its own callback function to call when the DOM loads.
cverrette

Re: Shadow + jquery 1.3.2

Reply Threaded More More options
Print post
Permalink
Thanks for the reply mjijackson

sorry about my vacation posts, didn't know it would do that lol