betaweb / inputtags-jquery-plugin Goto Github PK
View Code? Open in Web Editor NEWHome Page: http://betaweb.github.io/inputTags-jQuery-plugin/
Home Page: http://betaweb.github.io/inputTags-jQuery-plugin/
Hello,
Effort was : To integrate with Google AutoComplete
Problem: Google AutoComplete Supply data in Comma Separated Value so every location becomes tag (I.E. Ahmedabad, Gujarat, India => So tags are Ahmedabad and Gujarat and India)
Solution: I had to change Google Supplied comma separated data to convert into DASH or PERIOD
Code Change:
line 225 to 227
var value = self.$input.val().trim();
myvalue = value.replace(/,/g, ' - ', value);
var value = myvalue;
line 200, 201
myvalue = value.replace(/,/g, ' - ', value);
var value = myvalue;
line 347 to 349
myvalue = value.replace(/,/g, ' - ', value);
var $content = $(self.ITEM_CONTENT.replace('%s', myvalue));
var $item = $('<span>').addClass(self.ITEM_CLASS + ' is-closed').attr('data-tag', myvalue).html($content);
This is not an issue but solution for someone searching same.
Thanks for your great work!
Specifying default values like in the example you give on the documentation page isn't working.
<input type="text" value="one,two,three" id="tags" />
$('#tags').inputTags();
When you execute the code above you won't see any tags.
Hi when i keydown the key 13(enter) for confirm the tag, the form is submit.
Hello, thank you for this project.
I would to know how to reset an input after click on button
Thank you
When i want put a tag with enter the input change to the next
after changing language to Arabic, and pressing
"," ==> "ู"
the textbox add new item, without continue word !!!
case self.options.email:
re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
if(!re.test(value)){
type = 'email';
}
break;````
How can we use object key value pair instead of array for autocomplete property/option?
Hello,
When methods will come. I was thinking add this plugin to my project but methods are missing. The last update was 3 years ago. Are you still alive? Thanks.
use case: sometimes user only enter one value without hit enter then blur event could be used:
self._blur = function() {
self.$input.on('blur', function() {
if(self.$input.val().length > 0){
e = $.Event('keyup');
e.keyCode = 13;
e.which = 13;
self.$input.trigger(e);
}
});
};
On initialization
self._blur();
How to add or delete a tag by jquery
Hi,
Thanks for the nice library, there is an issue with cultures like "Arabic" where the key code 188 is not "comma", but any other letter in the relevant alphabet.
E.g.: in Arabic the letter "ู" has the same key code 188, so if I would type any word that containes this letter it is being splitted!
I modified the code to use e.key
instead of e.keyCode
, so I can read the actual key as we read it:
Also replaced key codes with actual keys self.keys = [",", "Escape"]
:
This temporary solution solved my issue.
Best,
Ziya
In your demo site (http://betaweb.github.io/inputTags-jQuery-plugin/), the autocomplete function does not work. Clicking on the input did show the list of tags, but clicking on one of those tags does nothing (it should add the tag to the input).
Please fix it, as I really like your plugin. Thank you!
hi i need destoy the plugin for turbolinks but $('.tagsInput').inputTags('destroy') not work
//code solves form submit problem
$(function(){
var keyStop = {
8: ":not(input:text, textarea, input:file, input:password)", // stop backspace = back
13: "input:text, input:password", // stop enter = submit
end: null
};
$(document).bind("keydown", function(event){
var selector = keyStop[event.which];
if(selector !== undefined && $(event.target).is(selector)) {
event.preventDefault(); //stop event
}
return true;
});
});
Any way to refresh data in autocomplete?
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.