EasyUI Forum
May 20, 2024, 08:38:39 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: show content in the "layout. region: center"  (Read 11025 times)
dayat
Newbie
*
Posts: 8


View Profile Email
« 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"
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 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.
Logged
dayat
Newbie
*
Posts: 8


View Profile Email
« Reply #2 on: January 16, 2014, 11:58:15 PM »

thank you. but I am still confused. implementation examples can be given into the sample program?
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #3 on: January 17, 2014, 12:01:25 AM »

Please refer to this tutorial http://www.jeasyui.com/tutorial/layout/layout.php.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!