I'm having trouble understanding why my volume slider doesn't work whenever the JS is in a JavaScript file, but works whenever its in a html file with the < script> tag.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>wynn</title>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/v4-shims.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="style.css">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
<script src="https://twemoji.maxcdn.com/v/latest/twemoji.min.js" crossorigin="anonymous"></script>
<script src="script.js"></script> <!-- this has the same thing as the bottom JS has. -->
<script>
window.onload = function() {
twemoji.parse(document.body, {
folder: 'svg',
ext: '.svg'
});
}
</script>
<style>
img.emoji {
width: 20px;
pointer-events: none;
}
</style>
</head>
<body>
<div >
<div style="width: 500px;">
<div >
<!-- BANNER -->
<img src="" style="width: 400px; height: 0px;">
<!-- PFP NAME -->
<h5 ><img src="https://cdn.discordapp.com/avatars/668093899683790859/a_57ab56ba8ed8be7ffef2686a81129ac3.gif" style="width: 100px; height: 100px;">wynn</h5>
<!-- DESCRIPTION -->
<p >i am wynn u know me from some places or you're just clicking on random peoples profiles on discord, either way hi