I am just trying out the example shown in the jQuery UI Layout plugin documentation. I have downloaded the required libraries and copied and pasted the code under the “example” page in the documentation.
My code:
<!DOCTYPE html >
<html>
<head>
<script src="../scripts/jquery-1.6.3.min.js" type="text/javascript"></script>
<script src="../scripts/jquery-ui-1.8.22.custom.min.js" type="text/javascript"></script>
<script src="../scripts/jquery.layout-latest.min.js"></script>
<script>
$(document).ready(function () {
$('body').layout({ applyDefaultStyles: true });
});
</script>
</head>
<body>
<div class="ui-layout-center">Center</div>
<div class="ui-layout-north">North</div>
<div class="ui-layout-south">South</div>
<div class="ui-layout-east">East</div>
<div class="ui-layout-west">West</div>
</body>
</html>
This shows a nice layout and resizing works but when I re size any of the panels I get a JavaScript alert that says: “/Inaccurate size after resizing [north pane]. See error console for details”.
This error only appears in IE9, in Google Chrome resizing works fine without the alert.
Any idea what I am doing wrong? Or how to go about not showing that Alert? Thanks!
I do not know what version of jquery UI Layout you used in the sample code. But I got the same error as you do when using the following version of the libs:
jquery-1.7.2.js
jquery-ui-1.8.22.custom.min.js
jquery.layout-latest.js (ver. 1.3.0 – rc30.6)
Changing from ver 1.3.0 rc 30.6 with jquery.layout-1.2.0.js makes your sample run in IE9. However, there seems to be a bug in the redrawing of the splitterbar when I run the sample; the North and West/Center splitterbars are thinner after first drag & drop.
Downloads for jquery UI Layout
…also I just found out that the demo site includes samples that yield the same error when run in IE9! – it seems they have a thing or two to solve for the lib to work in IE…
Buggy demos in IE9