<html>
<head>
<meta name = "viewport" content = "initial-scale = 1.0, user-scalable = no" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<script type="text/javascript" src="NKit.js"></script>
<script type="text/javascript" src="prototype.js"></script>
<script type="text/javascript" src="effects.js"></script>
<script type="text/javascript" src="showcase.js"></script>
<!--<script type="text/javascript" src="jquery.min.js"></script>-->
<script type="text/javascript">
var navController = new NKNavigationController();
navController.setTitle("Photo Gallery")
navController.setTintColor(51,87,24);
navController.show();
</script>
<style>
#showcase {
position: relative;
width: 700px;
height:170px;
}
#showcase li {
width: 170px;
height: 170px;
float: left;
list-style-type: none;
}
#showcase li img {
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<a href="#next" class="controls" rel="next">Next</a>
<a href="#previous" class="controls" rel="previous">Previous</a>
<ul id="showcase">
<li><img src="https://www.bowdenhostas.com/product_images/j/gold_standard___30686_thumb.jpg" alt="1" /></li>
<li><img src="bowden.png" alt="2" /></li>
<li><img src="https://www.bowdenhostas.com/product_images/j/gold_standard___30686_thumb.jpg" alt="1" /></li>
<li><img src="bowden.png" alt="2" /></li>
<li><img src="https://www.bowdenhostas.com/product_images/j/gold_standard___30686_thumb.jpg" alt="1" /></li>
<li><img src="bowden.png" alt="2" /></li>
<li><img src="https://www.bowdenhostas.com/product_images/j/gold_standard___30686_thumb.jpg" alt="1" /></li>
</ul>
<script>
document.observe('dom:loaded', function () {
new Showcase.Horizontal($$('#showcase li'), $$('a.controls'), {duration: 0.3});
});
</script>
</body>
</html>
HalfMoon wrote:Hey Sean
Try this for main3.html:
- Code: Select all
<html>
<head>
<meta name = "viewport" content = "initial-scale = 1.0, user-scalable = no" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<script type="text/javascript" src="NKit.js"></script>
<script type="text/javascript" src="prototype.js"></script>
<script type="text/javascript" src="effects.js"></script>
<script type="text/javascript" src="showcase.js"></script>
<!--<script type="text/javascript" src="jquery.min.js"></script>-->
<script type="text/javascript">
var navController = new NKNavigationController();
navController.setTitle("Photo Gallery")
navController.setTintColor(51,87,24);
navController.show();
</script>
<style>
#showcase {
position: relative;
width: 700px;
height:170px;
}
#showcase li {
width: 170px;
height: 170px;
float: left;
list-style-type: none;
}
#showcase li img {
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<a href="#next" class="controls" rel="next">Next</a>
<a href="#previous" class="controls" rel="previous">Previous</a>
<ul id="showcase">
<li><img src="https://www.bowdenhostas.com/product_images/j/gold_standard___30686_thumb.jpg" alt="1" /></li>
<li><img src="bowden.png" alt="2" /></li>
<li><img src="https://www.bowdenhostas.com/product_images/j/gold_standard___30686_thumb.jpg" alt="1" /></li>
<li><img src="bowden.png" alt="2" /></li>
<li><img src="https://www.bowdenhostas.com/product_images/j/gold_standard___30686_thumb.jpg" alt="1" /></li>
<li><img src="bowden.png" alt="2" /></li>
<li><img src="https://www.bowdenhostas.com/product_images/j/gold_standard___30686_thumb.jpg" alt="1" /></li>
</ul>
<script>
document.observe('dom:loaded', function () {
new Showcase.Horizontal($$('#showcase li'), $$('a.controls'), {duration: 0.3});
});
</script>
</body>
</html>
<script> document.observe('dom:loaded', function() { new Showcase.Horizontal($$('#showcase li), $$('a.controls), {duration: 0.3}); }); </script>
Sean2122dd wrote:Oh my goodness!!! Thank you!! So what was the issue?wasn't added before? If so could you explain this function please.
- Code: Select all
<script> document.observe('dom:loaded', function() { new Showcase.Horizontal($$('#showcase li), $$('a.controls), {duration: 0.3}); }); </script>
HalfMoon wrote:Sean2122dd wrote:Oh my goodness!!! Thank you!! So what was the issue?wasn't added before? If so could you explain this function please.
- Code: Select all
<script> document.observe('dom:loaded', function() { new Showcase.Horizontal($$('#showcase li), $$('a.controls), {duration: 0.3}); }); </script>
I've not really used the prototype library before, so this might not be 100% accurate but it seems to me that it watches for the dom to finish loading all the scripts and content, and then once everything is present, it fires the new showcase function. You had the project set up correctly (the scripts were in the right place and not in compile sources) but the showcase call wasn't quite there it seems.
$(document).ready(function() {
// jQuery code here
});
HalfMoon wrote:For a jQuery script it would be something like:
- Code: Select all
$(document).ready(function() {
// jQuery code here
});
Users browsing this forum: No registered users and 1 guest