house9 / jquery-iframe-auto-height

jQuery plugin to set the height of an iframe to its contents height
https://github.com/house9/jquery-iframe-auto-height
453 stars 211 forks source link

Resize not working in Firefox with data tables #27

Closed jqueryhacker closed 12 years ago

jqueryhacker commented 12 years ago

Hi,

My problem is similar to eriknyk's. I'm loading several different sized datatables into the same iFrame and need the height to adjust. This works well in chrome and IE9 but not in Firefox. Is there a hack for this?

Thank you.

house9 commented 12 years ago

My guess is that the 'datatables' are loaded using javascript? the plugin only fires when the iframe load event is kicked off, not sure why it would work in other browsers.

it would take some modifications to the plugin to allow calling the resizeHeight method from external code, but even with this you would need fire the event from the page that the iframe was in which would be far from ideal

house9 commented 12 years ago

you might want to check out this plugin - http://benalman.com/code/projects/jquery-resize/examples/resize/

house9 commented 12 years ago

I have added a triggerFunctions option to the plugin, so you can pass in click and resize event handlers, see the readme 1.8.0 and up, might help with this issue?