I am currently studying coding in school and have just started my coding journey 3 months ago. This is my first post on a forum, so please be kind!
I am encountering an issue with the drag function.
For an extracurricular activity for school kids, I came up with the idea of creating a color synthesis project using a computer. My goal is to create a circle with a drag function and a square border around the circle for resizing purposes.
My main focus is on the JavaScript function rather than CSS. The opacity feature creates an additive color system for the color synthesis.
// JavaScript code for drag and resize functions...
// CSS styling for the webpage...
<nav class="nav">
<a class="logo" href="#">Musiexplo</a>
<div class="nav-buttons">
<a class="nav-button" href="#">Connect</a>
<a class="nav-button" href="index.html">New Search</a>
</div>
</nav>
<body>
<contain class="homesearch">
<section class="sectionA row-col">
<div class="container">
<div class="square"></div>
<div class="circle"></div>
</div>
<div class="container" >
<div class="square"></div>
<div class="circle" style="background-color: red;"></div>
</div>
</section>
<section class="sectionB row">
<form action="" method="post">
<label for="style1" ></label>
<input type="text" type="subimt">
<button class="btn btn-primary mt-3" type="submit">Style1</button>
<label for="style2" ></label>
<input type="text" type="subimt">
<button class="btn btn-primary mt-3" type="submit">Style2</button>
</form>
</section>
</contain>