So I have this Clock that running after the getDate function, and it work pretty smooth. I can start run the wrapp of the clock and when clicking on the wrap, it starts move with an eventhandler. the problem is that i would be able to run the clock multiply time without the previous stop work. I know that the functions are overwriting each other, and i have been trying to move arround the function, but i havent been able to start multiply clocks.
I have the Clock() function that's wrap the other functions.
I have a createWrapp(), that dynamicly created the classes of the function, then I have the eventlistner that start the clock when clicking on the wrap.
The three is something like this.
function clock(){
function createWrapp(){
createElementsWithClass;
}
createWrapp();
function Wrapp(){
eventlistner connected to "clock-window-wrapper"
}
function myFunction(){
startClock();
}
}
This is my jsFiddle.
http://jsfiddle.net/dymond/nufwb/1/
Thanks