I made a back button with the url link javascript as ``javascript:history.back(-1);`
I also have a custom cursor, which works perfectly everywhere else, but for some reason, when using the back button link, the default cursor reappears on top of the custom cursor when returning to the previous page. Not sure why this back button javascript may be breaking the cursor hiding. Please help me understand why the cursor unhides with this javascript. Thanks!
Here is my site Read-Only: [LINK][1]
([how to share your site Read-Only link][2])
Hi there,
For the back button functionality, make sure to use the correct JavaScript code: javascript:window.history.go(-1)
.
Regarding custom cursors, while the cursor changes are visible during hover states, the cursor property must be configured in the none (default) state of the element. You can verify your cursor behavior by entering preview mode and testing the interaction with your styled element.
For optimal implementation:
- Select your element in the Designer
- Ensure you’re working with the none state
- Set your desired cursor property
- Test the hover interaction in preview mode
Hopefully this helps! If you still need assistance, please reply here so somebody from the community can help.
Hi,
The JavaScript before was working, and the javascript:window.history.go(-1)
does not. It takes me to the url: “about:blank#blocked” when clicked.
As for the cursor showing, it is in none state. It is when it is on the published site that the desired cursor interaction breaks when clicking the back button.
Here is the link to the published staging: https://scotts-site-e4dfb5.webflow.io/
On the about page the back button is at the top left corner of the page, and has the javascript javascript:window.history.go(-1)
On the photography page(link found in the about page) the back button is in the same location but with the javascript ``javascript:history.back(-1);` This javascript works for directing to the previous page, but the default cursor then appears on top of the custom cursor.