Author Topic: remove dropdown selected value  (Read 1050 times)

ketkigaur

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 4
    • View Profile
remove dropdown selected value
« on: March 22, 2021, 11:12:40 pm »
HI,

How can I remove selected dropdown value and default it back to empty selection. I am using init method( ui.$editor.on('change', function()) to call another method and based on returned value from that , dropdown selected value should get changed to default empty value.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6313
    • View Profile
Re: remove dropdown selected value
« Reply #1 on: March 23, 2021, 09:51:42 am »
Code: [Select]
ui.$editor.on('change', function(){

if( some condition ){
$(this).val(""); //set it to empty.
}
});