Results 1 to 6 of 6
Thread: Conditional and anchor jump
Sep 30, 2011, 04:00 #1
- Join Date
- May 2006
- 0 Post(s)
- 0 Thread(s)
Conditional and anchor jump
I am using a script called RecoverScroll which returns the page to its last loaded point when reloaded.
I am using it on a form page, I need it so that...
1. When the page errors and a div with an ID of #error-box is present in the markup the RecoverScroll script is ignored and the page jumps to #error-box (which isn't in the url)
2. alternatively, if I could append #error-box to the url if the #error-box div exists in the markup using js I could use the scripts functionality as intended.
The code to run the script...
<script> RecoverScroll.hash(); RecoverScroll.start('personal-details'); </script>