Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add callback when item removed #44

Merged
merged 1 commit into from
Dec 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
add callback when item removed
  • Loading branch information
slimani-dev committed Dec 18, 2018
commit 94b7e466d10be82c0d553ee5de00422e8fafbe99
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