Maikel
08-28-2011, 01:40 PM
Hello,
i have al little problem with 2 javascripts on 1 page.
One of the 2 is working and the other one fails.
One is an lightbox the other one a script for positioning shadows on the page.
Hope anyone can help me with this, i´m not an expert in javascript.
Here is the code:
<!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>
<title>Website</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="css/main.css"/>
<script type="text/javascript" src="scripts/prototype.js"></script>
<script type="text/javascript" src="scripts/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="scripts/lightbox.js"></script>
<script type="text/javascript" src="js/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="js/jquery.guid.js"></script>
<script type="text/javascript" src="js/jquery.dotimeout.js"></script>
<script type="text/javascript" src="js/jquery.shadowon.min.js"></script>
<link rel="stylesheet" href="styles/lightbox.css" type="text/css" media="screen" />
</head>
<body>
<script type="text/javascript">
$(document).ready(function () {
$("#box_left").shadowOn( { imageset: '3' } );
$("#box_right").shadowOn( { imageset: '3' } );
var offset = $('#box_left').offset();
var height = $('#content').height();
var bgRepoX = offset.left - 120;
var bgRepoY = offset.top + height - 220;
$("html,body").css("background", "url('images/object.png') no-repeat");
$('html,body').css({'backgroundPosition': + bgRepoX + 'px ' + bgRepoY + 'px'});
$(window).resize(function() {
var offset = $('#box_left').offset();
var height = $('#content').height();
var bgRepoX = offset.left - 120;
var bgRepoY = offset.top + height - 220;
$('html,body').css({'backgroundPosition': + bgRepoX + 'px ' + bgRepoY + 'px'});
});
});
</script>
-
<div class="text">
<h2>Impressie in beeld</h2>
<div id="streep"><img src="images/streep_right.png" border="0" style="float: right;"/></div><br />
Geniet van de beelden, lees over de ervaringen en raak geïnspireerd!
<BR><BR>
<ul>
<BR>
<a href="images/tafel.jpg" rel="lightbox" title=""><img src="images/ibiza.jpg" alt="" title="" width="150" height="100" border="0" /></a>
<a href="images/level2groot.jpg" rel="lightbox" title=""><img src="images/lapland.jpg" alt="" title="" width="150" height="100" border="0" /></a>
<a href="images/level3groot.jpg" rel="lightbox" title=""><img src="images/vervoer.jpg" alt="" title="" width="150" height="100" border="0" /></a>
<a href="images/trouwen-zuid-afrika.jpg" rel="lightbox" title=""><img src="images/tafel1.jpg" alt="" title="" width="150" height="200" border="0" /></a>
<a href="images/man1groot.jpg" rel="lightbox" title=""><img src="images/slippers.jpg" alt="" title="" width="150" height="200" border="0" />
<a href="images/man2groot.jpg" rel="lightbox" title=""><img src="images/glazen.jpg" alt="" title="" width="150" height="200" border="0" />
</ul>
<br /><br />
</div>
</div>
<div style="clear: both;"></div>
</div>
<div id="footer">
</body>
</html>
Thanks in Advance!!!
Greetings,
Maikel
i have al little problem with 2 javascripts on 1 page.
One of the 2 is working and the other one fails.
One is an lightbox the other one a script for positioning shadows on the page.
Hope anyone can help me with this, i´m not an expert in javascript.
Here is the code:
<!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>
<title>Website</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="css/main.css"/>
<script type="text/javascript" src="scripts/prototype.js"></script>
<script type="text/javascript" src="scripts/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="scripts/lightbox.js"></script>
<script type="text/javascript" src="js/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="js/jquery.guid.js"></script>
<script type="text/javascript" src="js/jquery.dotimeout.js"></script>
<script type="text/javascript" src="js/jquery.shadowon.min.js"></script>
<link rel="stylesheet" href="styles/lightbox.css" type="text/css" media="screen" />
</head>
<body>
<script type="text/javascript">
$(document).ready(function () {
$("#box_left").shadowOn( { imageset: '3' } );
$("#box_right").shadowOn( { imageset: '3' } );
var offset = $('#box_left').offset();
var height = $('#content').height();
var bgRepoX = offset.left - 120;
var bgRepoY = offset.top + height - 220;
$("html,body").css("background", "url('images/object.png') no-repeat");
$('html,body').css({'backgroundPosition': + bgRepoX + 'px ' + bgRepoY + 'px'});
$(window).resize(function() {
var offset = $('#box_left').offset();
var height = $('#content').height();
var bgRepoX = offset.left - 120;
var bgRepoY = offset.top + height - 220;
$('html,body').css({'backgroundPosition': + bgRepoX + 'px ' + bgRepoY + 'px'});
});
});
</script>
-
<div class="text">
<h2>Impressie in beeld</h2>
<div id="streep"><img src="images/streep_right.png" border="0" style="float: right;"/></div><br />
Geniet van de beelden, lees over de ervaringen en raak geïnspireerd!
<BR><BR>
<ul>
<BR>
<a href="images/tafel.jpg" rel="lightbox" title=""><img src="images/ibiza.jpg" alt="" title="" width="150" height="100" border="0" /></a>
<a href="images/level2groot.jpg" rel="lightbox" title=""><img src="images/lapland.jpg" alt="" title="" width="150" height="100" border="0" /></a>
<a href="images/level3groot.jpg" rel="lightbox" title=""><img src="images/vervoer.jpg" alt="" title="" width="150" height="100" border="0" /></a>
<a href="images/trouwen-zuid-afrika.jpg" rel="lightbox" title=""><img src="images/tafel1.jpg" alt="" title="" width="150" height="200" border="0" /></a>
<a href="images/man1groot.jpg" rel="lightbox" title=""><img src="images/slippers.jpg" alt="" title="" width="150" height="200" border="0" />
<a href="images/man2groot.jpg" rel="lightbox" title=""><img src="images/glazen.jpg" alt="" title="" width="150" height="200" border="0" />
</ul>
<br /><br />
</div>
</div>
<div style="clear: both;"></div>
</div>
<div id="footer">
</body>
</html>
Thanks in Advance!!!
Greetings,
Maikel