diff --git a/lib/ajax-chosen.js b/lib/ajax-chosen.js index c9e3123..01b87a5 100644 --- a/lib/ajax-chosen.js +++ b/lib/ajax-chosen.js @@ -21,12 +21,12 @@ options = $.extend({}, defaultOptions, $(select).data(), settings); this.chosen(chosenOptions ? chosenOptions : {}); return this.each(function() { - return $(this).next('.chzn-container').find(".search-field > input, .chzn-search > input").bind('keyup', function() { + return $(this).next('.chosen-container').find("input").bind('keyup', function() { var field, msg, success, untrimmed_val, val; untrimmed_val = $(this).val(); val = $.trim($(this).val()); msg = val.length < options.minTermLength ? options.keepTypingMsg : options.lookingForMsg + (" '" + val + "'"); - select.next('.chzn-container').find('.no-results').text(msg); + select.next('.chosen-container').find('.no-results').text(msg); if (val === $(this).data('prevVal')) { return false; } @@ -100,7 +100,7 @@ } }); if (nbItems) { - select.trigger("liszt:updated"); + select.trigger("chosen:updated"); } else { select.data().chosen.no_results_clear(); select.data().chosen.no_results(field.val());