【发布时间】:2020-03-04 10:15:55
【问题描述】:
在删除标签之前,我需要确认消息“是”或“否”。
插件链接在这里:https://yaireo.github.io/tagify/
谁能帮帮我?
<input name="tag_name" id="tagInput" placeholder="" value="">
<script>
var tagInput = document.querySelector('input[name="tag_name"]');
tagify = new Tagify(tagInput, {
whitelist: [],
maxTags: 1000,
dropdown: {
maxItems: 5, // <- mixumum allowed rendered suggestions
classname: "tags-look", // <- custom classname for this dropdown, so it could be targeted
enabled: 0, // <- show suggestions on focus
closeOnSelect: true // <- do not hide the suggestions dropdown once an item has been selected
}
});
tagify.on('remove', function(e) {
console.log('removed');
});
</script>
【问题讨论】:
-
是的,我知道,但在删除标签之前我只需要确认。
-
可能是我理解错了,在做某事之前需要用户确认吗?
-
是的,如果用户说是,那么在删除标签后。但没有发生。
-
那正是你要找的东西
标签: javascript jquery jquery-ui