$.fn.resizer = function(o){
var s = {}
$.extend(s,o);
return this.each(function(){
$(this).css({
'width':s.width+20,
'height':s.height+20
})
.parent().css({
'width':s.width,
'height':s.height
});
});
}
I want to do this with an iframe, from inside an iframe.
When I try to call it from there through:
$(top).uploader_finish({
width:original_width+<?php echo $this->sizes['width'] ?>+20,
height:original_height+<?php echo $this->sizes['height'] ?>+80
});
Getting the parent window, but how to directly access the iframe?
Thank;)
Update
The only solution I found is this:
$ (top.document) .find ('IFrame [name = default_1]');
And the default name is_1, as a parameter of $ _GET, inside the src iframe.
Or is there a way to get the iframe name from the inside?
Update
Aha! Found :)
window.name
So basically it will look like this?
$(top.document).find('iframe[name='+window.name+']');
source
share