11 AnswersNew Answer
You can set the visibility of the body to "hidden" until you click the screen , and then everything will appear.
add a full screen layer on your code Will continue work until onclick is detected
You should have a toggle var. Let's say var x = 0; onclick->x=(1-x); Then use if-else
i want to stop execution of the code until onclick is detected
@jaydeep khatri i want to stop the execution of the code with ondblclick and run it back when onclick is detected
I could need a little bit more input on what your code exactly does. Makes it easier to understand.
EDIT: modified the script, so that it will stop / continue running, each time the user double clicks somewhere on the document body. But somehow the tables are duplicated now. I'll take a look at the code and try to figure out what is doing this, but that might take some time... EDIT 2: Take a look at function loader4(). I have disabled it now and the duplicate cells disappeared. It would be easier, if all the text was English, so I could at least guess, what is happening. Abdo Gardam is it the one code on your SoloLearn Profile page? I cleaned up the code a little bit, moved the declared styles and inline styles to the CSS section, moved and merged all scripts to the JS section added JS function calls where necessary. Could you please try out the code now and tell me if it does what it should do? Thanks Here is the modified code: https://code.sololearn.com/WlTuPjyG1uVI/?ref=app
@pete wright this is my code i want to when dblclick is detected i want to wait for a click to run again please and thank you
I do have a toggle variable and conditionals. But I'm not sure about the rest of the code. var TOGGLE
can i change the visibilty of a div when it's doublclick and clear id_interval and when it's onclick the toggle continue and set id_interval ??
@pete wright when it's dblclick the code is paused but when i dblclick to resume it move away