Skip to content

Commit 8257611

Browse files
committed
Fix init from select for jQuery >= 1.9
Use correct jQuery API to get option value Fixes #1016
1 parent 6fbea9a commit 8257611

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/selectize.jquery.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ $.fn.selectize = function(settings_user) {
6060
var addOption = function($option, group) {
6161
$option = $($option);
6262

63-
var value = hash_key($option.attr('value'));
63+
var value = hash_key($option.val());
6464
if (!value && !settings.allowEmptyOption) return;
6565

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

0 commit comments

Comments
 (0)