Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

focus event not working in chosen jquery

I am using chosen jquery version 0.9.14.My problem is that chosen jquery does not supporting for focus event.Although i referred several example but that didnot help. can anyone help me please. i am using code as below:

    $('#proof_chzn').on('focus', function(e){
    var jobid=$('#id').val(); 
    if(jobid != ' ')
      {
          $("#proof").empty();
 jQuery.ajax({ 
      type: "post", 
      url:  "dynamicversion.php", 
      data: { id:jobid, flag:"refresh" }, 
      success: function(response)
      { 
                jQuery('#proof').append(response); 
              } 
        }); 
      }
     });

Html code for dropdown:

 <div id="proof_chzn" class="chzn-container chzn-container-single" 
 style="width:   285px;" title=""><a tabindex="-1" class="chzn-single"  
 href="javascript:void(0)"><span>New Revision</span><div><b></b></div></a>
 <div class="chzn-drop"><div class="chzn-search"><input type="text"   
 autocomplete="off">  
 </div><ul class="chzn-results"><li style="" class="active-result result-selected"  
 id="proof_chzn_o_0">New Revision</li></ul></div></div>
like image 590
user762641 Avatar asked Dec 05 '25 05:12

user762641


1 Answers

You can try this:

$(function() {
 $('#proof_chzn').trigger('chosen:activate');
});
like image 136
Nantebayo Avatar answered Dec 06 '25 17:12

Nantebayo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!