Plugin Directory

Changeset 458387


Ignore:
Timestamp:
11/01/2011 07:43:58 PM (14 years ago)
Author:
ramseyp
Message:

bugfixes in .js file - fixed selection of parent elements and the css width on resized images

Location:
wp-fluid-images/trunk/fluid-images
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • wp-fluid-images/trunk/fluid-images/lib/fluidimage.js

    r457221 r458387  
    77
    88function cleanImg(el) {
    9     jQuery('.' + el + ' img').each(function() {
     9    jQuery('div.' + el + ' img').each(function() {
    1010
    1111        // get image width & height attributes
    1212        var imgh = jQuery(this).attr('height');
    1313        var imgw = jQuery(this).attr('width');
    14         //find width of the .post / .page parent element
    15         var postw = jQuery('.post').width();
     14        //find width of the .post / .page parent div
     15        var postw = jQuery('div.' + el).width();
    1616       
    1717        //Remove the width & height attributes. If the image width exceeds the .post or .page container, set style attribute to width:100%
     
    1919            jQuery(this).removeAttr('width').removeAttr('height').attr('style','width="100%;');
    2020        }
     21       
    2122        //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:%
    2223        if (imgw < postw) {
    2324            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 + '%";');
    2526        }
    2627    });
  • wp-fluid-images/trunk/fluid-images/plugin.php

    r457221 r458387  
    88    Author URI: http://www.slash25.com
    99   
    10     Version: 1.0
     10    Version: 1.01
    1111   
    1212    License: GNU General Public License v2.0
  • wp-fluid-images/trunk/fluid-images/readme.txt

    r457221 r458387  
    44Tags: fluid, images, responsive
    55Requires at least: 3.0
    6 Tested up to: 3.3-beta2
     6Tested up to: 3.3-beta2-19067
    77Stable tag: trunk
    88
     
    3333== Changelog ==
    3434
     35= 1.0.1 =
     36Bugfix - corrected error in writing the style attribute on a resized image.
     37Bugfix - corrected selector to not include the body tag when selecting elements.
     38
    3539= 1.0 =
    3640* Initial Release.
Note: See TracChangeset for help on using the changeset viewer.