I have created a draggable window and I would like to expand this idea so I can create multiple windows. Right now I am relying heavily on id’s, but if I had multiple windows this would not work. I thought about primarily using classes to avoid duplicating id’s, but I’m confused on how to approach it. How should I go about this, or is there another solution you can recommend?
@Snowcap I couldn’t really view your code because I’m on mobile and it wasn’t separated, but are you worried about duplicate id’s? And are your elements going to be dynamic or generated through js?
Alright, so i just glanced at the product, and, well… To be blunt, you need to possibly worry about fixing any problems and/or bugs before you try to duplicate or clone these elements. The reason i say that is your pen totally freaked out on me, selected the entire pages text, and the box was about 500px down and to the right of my mouse without being able to “drop” the window.
A more serious question is, are you re-inventing the wheel because this is a project that you can say, “Hey, i accomplished this!” or are you just unfamiliar with jQuery and jQuery UI, like @Hompimpa mentioned?
I guess if you do not want to use a JS Library, and just pure JS, we should work from there.