Skip to content

Commit 51d058c

Browse files
committed
updated script to work properly with multiple instances
1 parent 6d2b1d3 commit 51d058c

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

jquery.tagsinput.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,10 @@
194194
if (settings.hide) {
195195
$(this).hide();
196196
}
197-
198-
var id = $(this).attr('id')
197+
var id = $(this).attr('id');
198+
if (!id || delimiter[$(this).attr('id')]) {
199+
id = $(this).attr('id', 'tags' + new Date().getTime()).attr('id');
200+
}
199201

200202
var data = jQuery.extend({
201203
pid:id,
@@ -321,7 +323,6 @@
321323
});
322324
}
323325
} // if settings.interactive
324-
return false;
325326
});
326327

327328
return this;

jquery.tagsinput.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)