Skip to content

Commit

Permalink
add callback when item removed
Browse files Browse the repository at this point in the history
  • Loading branch information
slimani-dev committed Dec 18, 2018
1 parent 82263fb commit 94b7e46
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions jquery.dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,7 @@
},
del: function (event) {
var _dropdown = this;
var _config = _dropdown.config;
var $target = $(event.target);
var id = $target.data('id');
// 2017-03-23 15:58:50 测试
Expand All @@ -414,6 +415,7 @@
_dropdown.$el.find('[data-value="' + id + '"]').removeClass('dropdown-chose');
_dropdown.$el.find('[value="' + id + '"]').prop('selected', false).removeAttr('selected');
$target.closest('.dropdown-selected').remove();
_config.choice.call(_dropdown, event);

return false;
},
Expand Down
Loading

0 comments on commit 94b7e46

Please sign in to comment.