Topic: Scrolling Website with iPhone Accelerometer
The script does not work on load (this is what i want) so i need to provide a way to the users to enable/disable the feature. I have included two buttons in the webpage that call the functions of the above script with the following code:
<center> Use the buttons to enable/disable accelerometer scrolling <button onclick="Enabled=true;Run()">Enable</button> <button onclick="Enabled=false;Run();stopScroll();">Disable</button></center>
The problem is that the browser does not remember the settings (if the users have pressed the buttons) so on the next load the user is requested to activate the script again if he/she wishes to.
Can somebody add the code so that the script would add a cookie and save the settings either if enable or disable button has been pressed and be able to read it?
I would appreciate it very much.
Thank you very much.