$(document).ready(function() { $("body").layout({ /* east & west panes require 'ID' selectors because they are 'nested inside a div' */ west__paneSelector: "#west" , east__paneSelector: "#east" /* north & south panes are 'children of body' */ , north__paneSelector: ".ui-layout-north"//默认配置,可省略 , south__paneSelector: ".myclass-south" /* center pane is a 'child of the first form' default-selector shown just for reference */ , center__paneSelector: ".ui-layout-center"//默认配置,可省略 }); });
<body> <!-- 'north' & 'south' are children of body --> <div class="ui-layout-north">north</div> <div class="myclass-south">south</div> <!-- 'center' is nested inside a form --> <form> <div class="ui-layout-center">center</div> </form> <!-- 'east' & 'west' are nested inside a div --> <div> <div id="west">west</div> <div id="east">east</div> </div> </body>