]> source.dussan.org Git - jquery-ui.git/commitdiff
Accordion: Fixed #7238 - Problem with accordion slide animation fixed width calculation
authorGaëtan Muller <m.gaetan89@gmail.com>
Sun, 6 Nov 2011 14:21:22 +0000 (15:21 +0100)
committerScott González <scott.gonzalez@gmail.com>
Mon, 7 Nov 2011 12:13:28 +0000 (07:13 -0500)
(cherry picked from commit 124cf3cc6c9bf182563e2fe0663cdde497700f7b)

ui/jquery.ui.accordion.js

index 9419089b5c652f6f014a2c57dbf0c3de50a51cb9..c20097e70b74b924e07ae254cfb0c514cae5cb73 100644 (file)
@@ -550,11 +550,11 @@ $.extend( $.ui.accordion, {
                        // fix width before calculating height of hidden element
                        var s = options.toShow;
                        originalWidth = s[0].style.width;
-                       s.width( parseInt( s.parent().width(), 10 )
-                               - parseInt( s.css( "paddingLeft" ), 10 )
-                               - parseInt( s.css( "paddingRight" ), 10 )
-                               - ( parseInt( s.css( "borderLeftWidth" ), 10 ) || 0 )
-                               - ( parseInt( s.css( "borderRightWidth" ), 10) || 0 ) );
+                       s.width( s.parent().width()
+                               - parseFloat( s.css( "paddingLeft" ) )
+                               - parseFloat( s.css( "paddingRight" ) )
+                               - ( parseFloat( s.css( "borderLeftWidth" ) ) || 0 )
+                               - ( parseFloat( s.css( "borderRightWidth" ) ) || 0 ) );
 
                        $.each( fxAttrs, function( i, prop ) {
                                hideProps[ prop ] = "hide";