EasyUI Forum
November 07, 2025, 02:25:05 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: how to add keydown event to toolbar buttons  (Read 6561 times)
korenanzo
Guest
« on: December 28, 2015, 07:56:24 AM »

Hi,
I use buttons properties to add buttons to my pagination toolbar , according to the manual:

http://www.jeasyui.com/documentation/index.php#
Code:
$('#pp').pagination({
  buttons: [{
iconCls:'icon-add',
handler:function(){alert('add')}
},'-',{
iconCls:'icon-save',
handler:function(){alert('save')}
}]
});


I need to add keydown evento to the buttons: is it possible?

Thanks,

RIk
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: December 29, 2015, 02:27:40 AM »

Please try this:
Code:
$('#pp').pagination({
  buttons: [{
  id:'btn-add',
iconCls:'icon-add',
handler:function(){alert('add')}
},'-',{
id:'btn-save',
iconCls:'icon-save',
handler:function(){alert('save')}
}]

});
$('#btn-add').bind('keydown',function(e){
//...
})
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!