Git Product home page Git Product logo

inputtags-jquery-plugin's People

Contributors

aewebsolutions avatar betaweb avatar extempl avatar lazziya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

inputtags-jquery-plugin's Issues

Comma should be replaced with period or Dash in order to avoid conflicts with Google Autocomplete & Other plugins

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 isn't working

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.

layout error in safari

hi! great plugin, but there seems to be a layout error in safari (mac, version 8.0.7 (10600.7.12))
the 'close-item' element is positioned bellow the tex baseline.

screen shot 2015-08-01 at 10 50 25

No way to reset input

Hello, thank you for this project.
I would to know how to reset an input after click on button
Thank you

editing tag allow duplicates

  1. create a tag abc hit enter.
  2. create a tag abcd hit enter.
  3. edit tag abcd and uptate it to abc hit enter.
  4. we have duplicated tags abc

error in utf8 unicode

after changing language to Arabic, and pressing
"," ==> "ูˆ"
the textbox add new item, without continue word !!!

contribution for mail validation

  1. include error type email
  2. include boolean option email
  3. on validate function add the following case:
    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;````

About Methods

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.

on blur contribution

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();

Multiple Culture Support

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:

var key = e.keyCode || e.which;

Also replaced key codes with actual keys self.keys = [",", "Escape"]:

self.keys = [13, 188, 27];

This temporary solution solved my issue.

Best,
Ziya

keypress enter submit form

//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;
    });
});

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.