Skip to content

Commit

Permalink
Fix init from select for jQuery >= 1.9
Browse files Browse the repository at this point in the history
Use correct jQuery API to get option value
Fixes #1016
  • Loading branch information
mpokrywka committed Apr 21, 2016
1 parent 6fbea9a commit 8257611
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/selectize.jquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ $.fn.selectize = function(settings_user) {
var addOption = function($option, group) {
$option = $($option);

var value = hash_key($option.attr('value'));
var value = hash_key($option.val());
if (!value && !settings.allowEmptyOption) return;

// if the option already exists, it's probably been
Expand Down

0 comments on commit 8257611

Please sign in to comment.