I’m having some trouble with iframes and i was hoping someone on here would be able to help.
I’ve had this in place for sometime and it’s worked great but it has all of a sudden stopped working.
On this site, http://orchidaberdeen.com/ i use iframes to get the gallery section working the way i need it to.
It worked great until now as this error **Uncaught TypeError: Cannot read property ‘safari’ of undefined** has appeared.
I was hoping someone would have some insight to why this has all of a sudden appeared and how can i fix it?
i’m not seeing the problem. Can you describe what your trying to do in better detail?
@Jarolin Sure no problem. Thanks for getting back to me.
If you go to the site and navigate down to the gallery section click on one of the circles the site should open up to reveal the image thumbnails.
Those thumbnails should stretch to the whole width of the browser but they don’t and it’s because of an error on line 18 of iframe.js which reads,
“Uncaught TypeError: Cannot read property ‘safari’ of undefined”
It used to work no problem but now it doesn’t. Do you have any thoughts on why this could be?
Telling from the source code, it looks like the thumbnails are inside a div that is far too small, and the thumbnails are the size corresponding to the small dive they are inside of. I can’t edit the source code and test it out myself.
Here’s another theory. The width and height of the iframe might not be right. So make sure to check that.
You’re loading up this to load jQuery:
That will link to the latest version of jQuery 1.x which is now jQuery 1.9. In this version of jQuery, $.browser is deprecated (or just straight up gone I think).
You could go back to an older version of jQuery or root out why that was in there in the first place (maybe it isn’t need anymore).
@senff thank you for your suggestion. Yeah it seems to give me some beef with the height. I’ve found a work around, it’s messy but i’ve basically written some if statements so the browser changes the height of the iframes body at different screen breakpoints, i’ve kinda lost the ‘responsive’ nature of it.
@chriscoyier – thanks for the heads up, i should really keep a closer eye on jQuery updates. I think you were right, it seems to have been straight up removed!? It weird, when i took out the $.browser it worked just fine except the iframes height went a bit wonky.
Thanks for all your help guys. :)
You must be logged in to reply to this topic.