From 8257611e145c76b522cf323c179fbd87442848e2 Mon Sep 17 00:00:00 2001 From: mpokrywka Date: Thu, 21 Apr 2016 23:34:20 +0200 Subject: [PATCH] Fix init from select for jQuery >= 1.9 Use correct jQuery API to get option value Fixes #1016 --- src/selectize.jquery.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/selectize.jquery.js b/src/selectize.jquery.js index 18f7b1c7c..96237a0f8 100644 --- a/src/selectize.jquery.js +++ b/src/selectize.jquery.js @@ -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