I can not manage to get the jquery-layout plugin's options to set. The default renders correctly, but the options don't. I attempt to set resizable and slidable on document ready, but when I alert for resizable it returns false. Can anyone spot what's going wrong here?
js:
$(document).ready(function() {
var myLayout = $('body').layout({
west: {
resizable: true,
resizeWhileDragging: true,
slidable: true
}
});
alert(myLayout.options.west.resizable); //returns false
});
html:
<body>
<div class="ui-layout-center">Center
<div id="board">
</div>
<button onclick="set_board();">New Game!</button>
<button onclick="execute_turn();">Turn!</button>
</div>
<div class="ui-layout-east">East</div>
<div class="ui-layout-west">West</div>
</body>
You're initializing the layout plugin twice... try conslidating the myLayout definition and initialization options: