EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: dayat on January 16, 2014, 07:56:15 AM



Title: show content in the "layout. region: center"
Post by: dayat on January 16, 2014, 07:56:15 AM
Good night. I have an example program

<html>
<head>
   <meta charset="UTF-8">
   <title>Full Layout - jQuery EasyUI Demo</title>
   <link rel="stylesheet" type="text/css" href="../../themes/metro/easyui.css">
   <link rel="stylesheet" type="text/css" href="../../themes/icon.css">
   <link rel="stylesheet" type="text/css" href="../demo.css">
   <script type="text/javascript" src="../../jquery.min.js"></script>
   <script type="text/javascript" src="../../jquery.easyui.min.js"></script>
</head>
<body class="easyui-layout">
   <div data-options="region:'north',border:false" style="height:60px;background:#B3DFDA;padding:10px">
      <div><a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-add'">form A</a>
      <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-remove'">form B</a>
      </div>
   </div>
   <div data-options="region:'west',split:true,title:'West'" style="width:150px;padding:10px;"></div>
   <div data-options="region:'center',title:'Center'"></div>
</body>
</html>

i want to ask. if I click the menu "form A" then display content "form A", if I click the menu "form B" then display content "form B"


Title: Re: show content in the "layout. region: center"
Post by: stworthy on January 16, 2014, 11:20:15 PM
Call 'panel' method to get center panel and you will be able to set any contents to it.
Code:
var p = $('body').layout('panel','center');  // get center panel
p.html('<p>content</p>');  // set panel content.


Title: Re: show content in the "layout. region: center"
Post by: dayat on January 16, 2014, 11:58:15 PM
thank you. but I am still confused. implementation examples can be given into the sample program?


Title: Re: show content in the "layout. region: center"
Post by: stworthy on January 17, 2014, 12:01:25 AM
Please refer to this tutorial http://www.jeasyui.com/tutorial/layout/layout.php.