select2 onchange event only works once

The Solution to select2 onchange event only works once is


This is what I am using:

$("#search_code").live('change', function(){
  alert(this.value)
});

For latest jQuery users, this one should work:

$(document.body).on("change","#search_code",function(){
 alert(this.value);
});

~ Answered on 2013-08-11 22:11:34


Most Viewed Questions: