EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: dailyblog on October 21, 2019, 06:00:08 AM



Title: strange issue
Post by: dailyblog 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???


Title: Re: strange issue
Post by: jarry 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)
}
})