jquery Programming Glossary: maxheight
Jquery resizing image http://stackoverflow.com/questions/1143517/jquery-resizing-image function var maxWidth 100 Max width for the image var maxHeight 100 Max height for the image var ratio 0 Used for aspect ratio.. image Check if current height is larger than max if height maxHeight ratio maxHeight height get ratio for scaling image this .css.. height is larger than max if height maxHeight ratio maxHeight height get ratio for scaling image this .css height maxHeight..
Use jQuery to Detect Container Overflow? http://stackoverflow.com/questions/2112106/use-jquery-to-detect-container-overflow ' ' var len children.length if len var maxWidth 0 var maxHeight 0 children.map function maxWidth Math.max maxWidth this .outerWidth.. maxWidth Math.max maxWidth this .outerWidth true maxHeight Math.max maxHeight this .outerHeight true return maxWidth this.width.. maxWidth this .outerWidth true maxHeight Math.max maxHeight this .outerHeight true return maxWidth this.width maxHeight..
How to resize images proportionally / keeping the aspect ratio? http://stackoverflow.com/questions/3971841/how-to-resize-images-proportionally-keeping-the-aspect-ratio function var maxWidth 100 Max width for the image var maxHeight 100 Max height for the image var ratio 0 Used for aspect ratio.. Check if current height is larger than max if height maxHeight ratio maxHeight height get ratio for scaling image this .css.. height is larger than max if height maxHeight ratio maxHeight height get ratio for scaling image this .css height maxHeight..
Auto-size dynamic text to fill fixed size container http://stackoverflow.com/questions/687998/auto-size-dynamic-text-to-fill-fixed-size-container var ourText 'span visible first' this var maxHeight this .height var maxWidth this .width var textHeight var textWidth.. ourText.width fontSize fontSize 1 while textHeight maxHeight textWidth maxWidth fontSize 3 return this jQuery document .ready..
Unable to load google in iframe in fancybox http://stackoverflow.com/questions/8803053/unable-to-load-google-in-iframe-in-fancybox document .ready function .various .fancybox maxWidth 800 maxHeight 600 fitToView false width '70 ' height '70 ' autoSize false..
Jquery resizing image http://stackoverflow.com/questions/1143517/jquery-resizing-image can help me document .ready function '.story small img' .each function var maxWidth 100 Max width for the image var maxHeight 100 Max height for the image var ratio 0 Used for aspect ratio var width this .width Current image width var height this.. on ratio height height ratio Reset height to match scaled image Check if current height is larger than max if height maxHeight ratio maxHeight height get ratio for scaling image this .css height maxHeight Set new height this .css width width ratio.. height ratio Reset height to match scaled image Check if current height is larger than max if height maxHeight ratio maxHeight height get ratio for scaling image this .css height maxHeight Set new height this .css width width ratio Scale width based..
Use jQuery to Detect Container Overflow? http://stackoverflow.com/questions/2112106/use-jquery-to-detect-container-overflow .fn.hasOverflow function var this this var children this.find ' ' var len children.length if len var maxWidth 0 var maxHeight 0 children.map function maxWidth Math.max maxWidth this .outerWidth true maxHeight Math.max maxHeight this .outerHeight.. if len var maxWidth 0 var maxHeight 0 children.map function maxWidth Math.max maxWidth this .outerWidth true maxHeight Math.max maxHeight this .outerHeight true return maxWidth this.width maxHeight this.height return false Example var content.. maxWidth 0 var maxHeight 0 children.map function maxWidth Math.max maxWidth this .outerWidth true maxHeight Math.max maxHeight this .outerHeight true return maxWidth this.width maxHeight this.height return false Example var content '#content' .children..
How to resize images proportionally / keeping the aspect ratio? http://stackoverflow.com/questions/3971841/how-to-resize-images-proportionally-keeping-the-aspect-ratio image resize document .ready function '.story small img' .each function var maxWidth 100 Max width for the image var maxHeight 100 Max height for the image var ratio 0 Used for aspect ratio var width this .width Current image width var height this.. scaled image width width ratio Reset width to match scaled image Check if current height is larger than max if height maxHeight ratio maxHeight height get ratio for scaling image this .css height maxHeight Set new height this .css width width ratio.. width ratio Reset width to match scaled image Check if current height is larger than max if height maxHeight ratio maxHeight height get ratio for scaling image this .css height maxHeight Set new height this .css width width ratio Scale width based..
Auto-size dynamic text to fill fixed size container http://stackoverflow.com/questions/687998/auto-size-dynamic-text-to-fill-fixed-size-container function .fn.textfill function options var fontSize options.maxFontPixels var ourText 'span visible first' this var maxHeight this .height var maxWidth this .width var textHeight var textWidth do ourText.css 'font size' fontSize textHeight ourText.height.. 'font size' fontSize textHeight ourText.height textWidth ourText.width fontSize fontSize 1 while textHeight maxHeight textWidth maxWidth fontSize 3 return this jQuery document .ready function '.jtextfill' .textfill maxFontPixels 36 and my..
Unable to load google in iframe in fancybox http://stackoverflow.com/questions/8803053/unable-to-load-google-in-iframe-in-fancybox jquery.fancybox.css media screen script type text javascript document .ready function .various .fancybox maxWidth 800 maxHeight 600 fitToView false width '70 ' height '70 ' autoSize false closeClick false openEffect 'none' closeEffect 'none' script..
|