How do I reset a jquery-chosen select option with jQuery?

前端 未结 21 734
一个人的身影
一个人的身影 2020-11-30 21:42

I have tried numerous things and nothing seems to be working.

I am using jQuery and Chosen plugin.

Methods I have tried:

var select = jQuery(         


        
21条回答
  •  隐瞒了意图╮
    2020-11-30 22:11

    This is more effective than find.

    $('select').children('option').first().prop('selected', true)
    $('select').trigger("chosen:updated");
    

提交回复
热议问题