Note that there are some explanatory texts on larger screens.

plurals
  1. POJquery Make Flash 100% fit to DIV
    primarykey
    data
    text
    <p>I've managed to rewrite a script wich makes Images resize to 100% width of their parent Div Container To a Script that now lets Swf embed objects resize (Original Image resize Script by Oliver Boermans ollicle.c o m/eg/jquery/imagefit/ )</p> <p>All i did is replaced the img with an "embed" in all lines where the parameters of the img tag should replace the width and height values.</p> <p>In Firefox everything is working but in IE 7 no Luck at all.</p> <p><a href="http://scoramba.de/teyoprise/" rel="nofollow noreferrer">Here a link to my Project</a></p> <p>watch the flash video resizing nicely in firefox, while IE 7 is shouting out an error.</p> <p>Here is my jquery js function:</p> <pre><code>(function($) { $.fn.imagefit = function(options) { var fit = { all : function(imgs){ imgs.each(function(){ fit.one(this); }) }, one : function(img){ $(img) .width('100%').each(function() { $(this).height(Math.round( $(this).attr('startheight')*($(this).width()/$(this).attr('startwidth'))) ); }) } }; this.each(function(){ var container = this; // store list of contained images (excluding those in tables) var imgs = $('img', container).not($("table img")); // store initial dimensions on each image imgs.each(function(){ $(this).attr('startwidth', $(this).width()) .attr('startheight', $(this).height()) .css('max-width', $(this).attr('startwidth')+"px"); fit.one(this); }); // Re-adjust when window width is changed $(window).bind('resize', function(){ fit.all(imgs); }); }); return this; }; </code></pre> <p>})(jQuery);</p> <p>The each functions are responsible for going thru all divs i called from the trigger function:jQuery(document).ready(function(){ jQuery('.widget-content').flashfit(); });</p> <p>How can i make it work for Internet Explorer and Chrome as well ?? any ideas ?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload