So whenever I launch the program live from Visual Code, it works as intended. The issue I have is running the code locally when I navigate from the index file in the file folder. I’m positive the issue is within the index file, but I can’t find the issue.
<!DOCTYPE html>
<html lang="en">
<header>
<meta charset="utf-8">
<title>3D Art Carousel</title>
<base href="images/Enchantress of the Haze.jpg">
<link rel="stylesheet" type="text/css" href="/style.css">
</header>
<body>
<div id="carousel">
<figure id="spinner">
<img src="Seed of the Haze.jpg" alt="Seed of the Haze">
<img src="Daughter of the Haze.jpg" alt="Daughter of the Haze">
<img src="Enchantress of the Haze.jpg" alt="Enchantress of the Haze">
<img src="Primeval Ruins.jpg" alt="Primeval Ruins">
<img src="Ruins.jpg" alt="Ruins">
<img src="Fish Creature.jpg" alt="Digital fish creature">
<img src="Fish Creature.png" alt="Digital fish creature 2">
<img src="Leviathan Hunter.jpg" alt="Leviathan Hunter">
</figure>
</div>
<script src="/main.js"></script>
</body>
<span style="float:left" class="ss-icon" onclick="galleryspin('-')"><</span>
<span style="float:right" class="ss-icon" onclick="galleryspin('')">></span>
</html>
Perhaps their is a line of code missing? I’m not sure why it works through Visual code, but not locally on my PC. I admittedly lack experience using jqueries. Here is the main Java file as well:
var angle = 0;
function galleryspin(sign) {
spinner = document.querySelector("#spinner");
if (!sign) { angle = angle + 45; } else { angle = angle - 45; }
spinner.setAttribute("style","-webkit-transform: rotateY("+ angle +"deg); -moz-transform: rotateY("+ angle +"deg); transform: rotateY("+ angle +"deg);");
}
text
user26357207 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1