Changeset 458387
- Timestamp:
- 11/01/2011 07:43:58 PM (14 years ago)
- Location:
- wp-fluid-images/trunk/fluid-images
- Files:
-
- 3 edited
-
lib/fluidimage.js (modified) (2 diffs)
-
plugin.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-fluid-images/trunk/fluid-images/lib/fluidimage.js
r457221 r458387 7 7 8 8 function cleanImg(el) { 9 jQuery(' .' + el + ' img').each(function() {9 jQuery('div.' + el + ' img').each(function() { 10 10 11 11 // get image width & height attributes 12 12 var imgh = jQuery(this).attr('height'); 13 13 var imgw = jQuery(this).attr('width'); 14 //find width of the .post / .page parent element15 var postw = jQuery(' .post').width();14 //find width of the .post / .page parent div 15 var postw = jQuery('div.' + el).width(); 16 16 17 17 //Remove the width & height attributes. If the image width exceeds the .post or .page container, set style attribute to width:100% … … 19 19 jQuery(this).removeAttr('width').removeAttr('height').attr('style','width="100%;'); 20 20 } 21 21 22 //Remove the width & height attributes. If the image width is narrower than the .post or .page container, calculate the width of the image as a percentage of the container width, set style attribute to width:% 22 23 if (imgw < postw) { 23 24 var nperc = ((imgw / postw) * 100); 24 jQuery(this).removeAttr('width').removeAttr('height').attr('style','width ="' + nperc + '%";');25 jQuery(this).removeAttr('width').removeAttr('height').attr('style','width:' + nperc + '%";'); 25 26 } 26 27 }); -
wp-fluid-images/trunk/fluid-images/plugin.php
r457221 r458387 8 8 Author URI: http://www.slash25.com 9 9 10 Version: 1.0 10 Version: 1.01 11 11 12 12 License: GNU General Public License v2.0 -
wp-fluid-images/trunk/fluid-images/readme.txt
r457221 r458387 4 4 Tags: fluid, images, responsive 5 5 Requires at least: 3.0 6 Tested up to: 3.3-beta2 6 Tested up to: 3.3-beta2-19067 7 7 Stable tag: trunk 8 8 … … 33 33 == Changelog == 34 34 35 = 1.0.1 = 36 Bugfix - corrected error in writing the style attribute on a resized image. 37 Bugfix - corrected selector to not include the body tag when selecting elements. 38 35 39 = 1.0 = 36 40 * Initial Release.
Note: See TracChangeset
for help on using the changeset viewer.