]> source.dussan.org Git - jquery-ui.git/commitdiff
Accordion: Fixed #7238 - Problem with accordion slide animation fixed width calculation 517/head
authorGaëtan Muller <m.gaetan89@gmail.com>
Sun, 6 Nov 2011 14:21:22 +0000 (15:21 +0100)
committerGaëtan Muller <m.gaetan89@gmail.com>
Sun, 6 Nov 2011 14:21:22 +0000 (15:21 +0100)
ui/jquery.ui.accordion.js

index 580009d33a3f27612d60f3ee4907c64869ed3fc5..6eb496a43c147e686d63b8f53f2ad3755ed33f8a 100644 (file)
@@ -483,11 +483,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";