unveil
unveil copied to clipboard
Removed unnecessary window height calculations to minimize reflows. Added an option to throttle scroll and resize events. Cleaned up the plugin API to use an options object rather than arguments.
- Removed unnecessary window height calculations to minimize reflows.
- Added an option to throttle scroll and resize events.
- Cleaned up the plugin API to use an options object rather than arguments.
Hi Mark,
Sorry for taking a couple days to add my feedback to this PR.
This PR adds some features that this plugin really needs, especially throttling the scroll and resize events.
It's cool that you changed it to accept an options
object but the thing is, the callback function should also be part of the options object and if we do that, it's going to break compatibility.
If I merge this PR I'll have to bump the version to v2 and I'm all already working on the v2 version which is almost ready and will include a throttle option as well .
Great PR!
Is this going to be merged?
+1
@mstuart i found an issue with your fork: it seems like it is not working on my iPhone 4 with iOS7. The images are not loading at all. Could it have something to do with the "height calculations"? I am no javascript expert, but i know scrolling is different on touch devices.
Oops sorry. I haven't tested on iOS7. This PR is very old. I'll check it out tonight
:+1: when this will get merged?.
before i had to set height for each image to get it work, with this change i no longer need to set height attr for image, which is great for responsive design.
+1