jparallax
jparallax copied to clipboard
Freeze Event Only Works Once Cursor Has Left Viewport
Problem
Error when trying to call the "freeze" feature of jParallax, instead of the freeze applying to the layer instantly, the freeze only takes effect after the cursor has left the viewport.
Work done
- Local testing: To remove any issues, I've downloaded the exact same JavaScript dependencies to my local site as what is referenced on the demo site (http://stephband.info/jparallax/) and tried to call the .trigger( "freeze" ) event from within the code, as well as from the web console, but it only "activates" once I move my cursor outside of the viewport.
- Demo-site testing: Tested further by using Firefox on the demo site (http://stephband.info/jparallax/) and the web console to trigger $( ".parallax-layer" ).trigger( "freeze" ) while mouse inside the viewport, same error, the freeze will fail unless the cursor leaves the viewport.
When does it work?
- However, strangely, if you take the tip from issue #52 the freeze is instant.
- Just tested it in Google Chrome and the freeze is instant as expected.