width()/height() calculations not equal to jQuery's internal width()/height()
| Project: | Dimensions |
| Version: | 1.2.0 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
The dimensions plug-in uses the following to calculate width/height:
num( this, name.toLowerCase() )
The num() function looks like:
function num(el, prop) {
return parseInt($.curCSS(el.jquery?el[0]:el,prop,true))||0;
};
The problem is that if the element is not visible, the calculation is wrong. The internal jQuery css() function has code that correctly calculates the width()/height().
I'd suggest using the css() method instead of curCSS() when calculating either the width() or height() of an element.
