Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

jQuery EasyUI Layout - Creating an XP-Style Left Panel

jQuery EasyUI Layout - Creating an XP-Style Left Panel

Typically, in Windows Explorer folders in Windows XP, the left panel contains some common tasks. This tutorial shows you how to create an XP-style left panel using the easyui panel plugin.

Defining some panels

We define some panels that are used to display tasks. Each panel should have at least collapse/expand tool buttons.

The code is as follows:



    
        
            View as a slide show
            Order prints online
            Print pictures         
        
        
            Make a new folder
            Publish this folder to the Web
            Share this folder         
        
        
            New York
            My Pictures
            My Computer
            My Network Places         
        
        
            My documents
            File folder

            Date modified: Oct.3rd 2010         
    

Customizing the panel's appearance

Note that this visual appearance is not what we want; we must change the panel header's background image and the icons of the collapse/expand buttons.

This is not difficult; all we need to do is redefine some CSS.



    .panel-body{

        background:#f0f0f0;

    }

    .panel-header{

        background:#fff url('images/panel_header_bg.gif') no-repeat top right;

    }

    .panel-tool-collapse{

        background:url('images/arrow_up.gif') no-repeat 0px -3px;

    }

    .panel-tool-expand{

        background:url('images/arrow_down.gif') no-repeat 0px -3px;

    }

Thus, defining a user interface with easyui is very simple.

Download the jQuery EasyUI example

jeasyui-layout-xp.zip