简体   繁体   中英

Trying to Load php file ( with image tag ) into fancybox

I recently needed to load images into a Fancybox and count them as they were displayed so I could know how many times each one was viewed. I was able to find an answer through here but when looking at it again today it looks like the width is not autosizing. Yesterday it must have been cached thats why it seemed ok. I look at the source through firebug and can clearly see that the width is 0, the odd thing is the height adjusts each time I click next or previous going through the gallery. The answer yesterday was to load a php file into the fancybox, count the image and then display the image. Any ideas on how to get the autosize width to work with this method?

Is the php file loading the image and sending the image headers after you count the image or ae you using html code to display? ie '' If it is the latter you should be sending the image headers and fancybox should read them then adjust the window size automatically.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM