jQuery EasyUI layout - create a border for the page layout

Border layout (border layout) offers five regions: east, west, north, south, center. Here are some common usages:

  • north area can be used to display banners site.
  • south area can be used to display copyright and some instructions.
  • west area can be used to display the navigation menu.
  • east area can be used to display some promotional items.
  • center area can be used to display the main content.

To apply the layout (layout), you should determine a layout (layout) container, and then define some areas. Layout (layout) must require at least a center region, the following is a layout (layout) Example:

	<Div class = "easyui-layout" style = "width: 400px; height: 200px;">
		<Div region = "west" split = "true" title = "Navigator" style = "width: 150px;">
			<P style = "padding: 5px; margin: 0;"> Select language: </ p>
			<Ul>
				<Li> <a href="javascript:void(0)" onclick="showcontent('java')"> Java </a> </ li>
				<Li> <a href="javascript:void(0)" onclick="showcontent('cshape')"> C # </a> </ li>
				<Li> <a href="javascript:void(0)" onclick="showcontent('vb')"> VB </a> </ li>
				<Li> <a href="javascript:void(0)" onclick="showcontent('erlang')"> Erlang </a> </ li>
			</ Ul>
		</ Div>
		<Div id = "content" region = "center" title = "Language" style = "padding: 5px;">
		</ Div>
	</ Div>

We create a <div> container with a border layout (border layout), layout (layout) of the container is cut into two parts, the left is the navigation menu on the right is the main content.

Finally, we write an onclick event handler to retrieve the data, 'showcontent' function is very simple:

	function showcontent (language) {
		. $ ( '# Content') html ( 'Introduction to' + language + 'language');
	}

Download jQuery EasyUI examples

jeasyui-layout-layout.zip