jquery.suggestions: Use document.documentElement.clientWidth
[lhc/web/wiklou.git] / resources / src / jquery / jquery.suggestions.js
index 4a1d637..964f5d0 100644 (file)
                                                } else {
                                                        // Expand from right
                                                        newCSS.left = 'auto';
-                                                       newCSS.right = $( 'body' ).width() - ( regionPosition.left + context.config.$region.outerWidth() );
+                                                       newCSS.right = document.documentElement.clientWidth -
+                                                               ( regionPosition.left + context.config.$region.outerWidth() );
                                                }
 
                                                context.data.$container.css( newCSS );
                                                                );
                                                        } )
                                        )
-                                       .appendTo( $( 'body' ) );
+                                       .appendTo( document.body );
 
                                $( this )
                                        // Stop browser autocomplete from interfering