EasyUI Forum
May 05, 2024, 09:50:42 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: strange issue  (Read 2712 times)
dailyblog
Newbie
*
Posts: 30


View Profile Email
« on: October 21, 2019, 06:00:08 AM »

Code:
$.extend(
    $.fn.combobox.defaults,{
        onShowPanel:function(e){
            var panelOptions=$(this).combobox("panel").panel("options");
            console.log(panelOptions,panelOptions.top)
            }
     }
)
show the panel the first time,  console output: top value exists in options object , panelOptions.top is null .
after the panel shown the second time ,panelOptions.top is the same with top value in options object.
why???
Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 on: October 21, 2019, 08:34:58 PM »

Top get the drop-down panel's position, please try this code instead.
Code:
$('#cc').combo('panel').panel({
onMove: function(left,top){
console.log(left+":"+top)
}
})
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!