EasyUI Forum
May 11, 2024, 04:48:45 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: Using "live" with panel events?  (Read 9511 times)
tslatt
Jr. Member
**
Posts: 85



View Profile
« on: November 22, 2011, 10:35:28 AM »

How can I use "live" with this code? I want to set up events on panels that exist now and in the future, as I dynamically add more panels later.

Code:
//add events to all panels
$(".easyui-panel").each(function(index) {//for all panels
  $(this).panel({//for this panel

    onLoad: function() {//do this when a panel's href is loaded (ajax)
      //my actions here
    },//end on panel ajax load

    onClose: function() {//do this on panel close
      //my actions here
    },//end on panel close

    onCollapse: function() {//do this on panel expand
      //my actions here
    },//end on panel collapse

    onExpand: function() {//do this on panel expand
      //my actions here
    },//end on panel expand

    onMaximize: function() {//do this on panel maximize
      //my actions here
    },//end on panel maximize

    onRestore: function() {//do this on panel restore (unmaximized)
      //my actions here
    },//end on panel restore (unmaximized)

    onResize: function(width, height) {//do this on panel move/resize
      //my actions here
    }//end on panel move/resize

  });//end for this panel
});//end for all panels
//end add events to all panels

Any help would be greatly appreciated.
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!