You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which works perfectly fine! However, I have an option on the page to change that image from color to black & white. This setting is changed in the database and is automatically picked up by the getimage.php script. So all I need to do to update the preview, is refresh the image.
@sebarmeli yes, that is correct. I want the lazy load to happen once the user scrolls within the #preview div.
I was able to resolve this issue by doing the following:
1- Update the jail.min.js script and remove the following statement:
n.removeAttr("data-src")
2- Run the following script before calling $('img.lazy').jail() the second time (attaching the &reload=1 parameter forces the browser to perform a refresh of the image):
I'm using the jail() method to load a sensitive user-uploaded image that is supplied by a PHP script (upon proper validation of the users session).
The image tag i'm using is shown below:
Now, in order to load it I use the following code:
Which works perfectly fine! However, I have an option on the page to change that image from color to black & white. This setting is changed in the database and is automatically picked up by the getimage.php script. So all I need to do to update the preview, is refresh the image.
In order to do that, I simply used:
This fails (using Firebug) with the following message:
"NetworkError: 404 Not Found - http://localhost/undefined"
I suspect that JAIL clears the data-src element after the image is loaded. Is that expected behavior or is it a bug?
Thanks,
Floating Rock
The text was updated successfully, but these errors were encountered: