Comments (6)
perfect, thanks a bunch for the quick fix !
from tagify.
Hey there, I am working with removing all Tags with Jquery version of your code, I have no issue but have a doubt. Why below is happening?
Not Working Code-
var input = $('[name=tags]').tagify(); input.removeAllTags();
Working Code-
var input = $('[name=tags]').tagify(); var jqTagify = input.data('tagify'); jqTagify.removeAllTags();
from tagify.
Thanks for letting me know brother. Apparently it was a problem with the demo's code.
I've updated the index.html file and now it's ok.
BTW, I think the 404 you saw was GitHub's error since they host everything including the demo page.
from tagify.
@ycv005
Just came across this as I was looking for something similar. Here is an example of what I use that works and does not require saving as vars :
$('#s2Tags').tagify({
placeholder: 'add keyword',
backspace: false,
editTags: {
clicks: 1
}
});
$('#s2TagsRemove').on('click', function (e) {
e.preventDefault();
$('#s2Tags').data('tagify').removeAllTags();
});
You should have used input.data('tagify').removeAllTags();
in your 'not working' code.
from tagify.
removeAllTags doesn't clear persisted storage. How to fix?
from tagify.
@jjxtra - well, who store the data in the persisted storage in the first place...? 😉
from tagify.
Related Issues (20)
- `transformTag` is not called before a tag is edited by selecting a dropdown suggestion HOT 1
- N items selected instead of showing everything selected HOT 2
- How can i refresh dropdown list after adding action HOT 2
- Different order of callbacks on desktop and mobile HOT 3
- Duplicate entry on hit Return for suggestion HOT 6
- Allow hitting TAB for autocomplete, as well as right arrow key HOT 6
- Delimiter 'spacebar'-key doesn't work correctly - tag is added only after another text input is performed HOT 1
- Empty (no value) edited tag is not removed when pressing `esc` key HOT 5
- Template with select mode HOT 2
- Duplicated item does not appear in dropdown even though `duplicates` is set to `true` when whitelisting a list of strings HOT 1
- calling `addEmptyTag()` with `dropdown.enabled: 0` setting should create an empty tag with a dropdown of suggestions
- Selecting with properties other than value doesn't work HOT 2
- Not allowing to edit the last tag HOT 1
- How to insert tag into the textarea at the current cursor position?
- Selecting a second time breaks HOT 2
- Cross-site Scripting Vulnerability in @yaireo/tagify Package HOT 3
- userInput: false not working dropdown HOT 2
- Pasting into autocomplete/suggestion box doesn't fire 'input' event -- Possible workaround given in jsbin HOT 1
- Tag element does not exist HOT 1
- Tabbing without selecting a single-select has TypeError / null dereference HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tagify.