The resize is set "TRUE;" by default but when I click on an image with has the autoload class the image resize is tiny and i get horizontal and vertical scrollbars. The second time i view that image it works fine.
The resize is set "TRUE;" by default but when I click on an image with has the autoload class the image resize is tiny and i get horizontal and vertical scrollbars. The second time i view that image it works fine.
Comments
Comment #1
tronathan commentedThis appears to be something related to loading the image.
If the image is not loaded in the browsers cache when the modal is called, this can occur.
To fix, I added the image to the containing page in an invisible div. This causes the image to load into the browsers cache on page load. This makes the pages heavier but appears to fix the problem.
When the user clicks the automodal link to display the image, the image is already cached. The image then displays correctly in the automodal.
Apparently the JS is not waiting until the image is actually loaded before determining the size to resize to, and therefore resizes to the smallest size possible.
The automodal size detection needs to wait longer, perhaps for a document.ready(), before resizing.
Comment #2
Anonymous (not verified) commentedinteresting solution . I am going to try this out. I have about 25 images on the page and will have to test it for speed time.
Thanks
Comment #3
Anonymous (not verified) commentedComment #5
dennis605 commentedI know that's not the correct way, but i did it this way:
In my automodal.js I inserted after:
this:
The whole code looks like that then:
This's working perfect for me.
Comment #6
modctek commentedThe suggested change in #5 broke automodal for me. Perhaps something has changed in jQuery?