# Creating Many Draggable Elements in JavaScript

**URL:** https://forum.kirupa.com/t/creating-many-draggable-elements-in-javascript/652156
**Category:** programming
**Created:** [June 8, 2022, 7:13pm UTC](https://forum.kirupa.com/t/creating-many-draggable-elements-in-javascript/652156 "2022-06-08T19:13:09Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Diego\_Ortiz](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/diego_ortiz/32/17879_2.png) [@Diego\_Ortiz](https://forum.kirupa.com/u/Diego_Ortiz)
#### Post date: [June 8, 2022, 7:13pm UTC](https://forum.kirupa.com/t/creating-many-draggable-elements-in-javascript/652156/1 "2022-06-08T19:13:09Z")

</div>

Hi everybody! I want to have multiple divs on my website to be draggable and movable across the website (or at least in the container which it’s found). I used this javascript to be able to move one but how do i change it so i can add other elements?  
this is the link for the code: [Create a Draggable Element in JavaScript | KIRUPA](https://www.kirupa.com/html5/drag.htm#)  
thank you for ur help!

---

<div class="post-metadata">

### Author: ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)
#### Post date: [June 9, 2022, 3:47am UTC](https://forum.kirupa.com/t/creating-many-draggable-elements-in-javascript/652156/2 "2022-06-09T03:47:49Z")

</div>

Hey @Diego_Ortiz - welcome to the forums 🙂

You can find the code for doing that in this post: [Create a Draggable Element in JavaScript - #3 by kirupa](http://forum.kirupa.com/t/create-a-draggable-element-in-javascript/638149/3)

🥳
