jEasyUI custom window toolbar
By default, the window has four tools: collapsible, minimizable, maximizable and closable. For example, we define the following window:
<div id="win" class="easyui-window" title="My Window" style="padding:10px;width:200px;height:100px;"> window content </div>
If you need to customize the tool, set the tool to true or false. For example, we want to define a window that only has a tool that can be closed. You should set any other tools to false. We can define tools attribute in markup or through jQuery code. Now we use jQuery code to define the window:
$('#win').window({ collapsible:false, minimizable:false, maximizable:false });
If we want to add custom tools to the window, we can use the tools attribute. As an example demonstration, we add two tools to the window:
$('#win').window({ collapsible:false, minimizable:false, maximizable:false, tools:[{ iconCls:'icon-add', handler:function(){ alert('add'); } },{ iconCls:'icon-remove', handler:function(){ alert('remove'); } }] });
Download jQuery EasyUI example
jeasyui-win-win2.zip