sniperwolf / taggingJS

jQuery plugin to tagging like a charm!
http://sniperwolf.github.io/taggingJS/
MIT License
933 stars 151 forks source link

this.tags is on the prototype instead of the element. #22

Closed ScarletCarson closed 10 years ago

ScarletCarson commented 10 years ago

This:

Tagging.prototype = {
        tags: [],
...

Should be:

var Tagging = function(elem, options) {
        this.elem = elem;
        this.$elem = $(elem);
        this.options = options;
        this.tags = [];
}

In order to allow a user to use more than one tagging block per page.

stephenedmondson commented 10 years ago

I'm seeing this issue as well. Unable to have multiple instances of inputs on the same page as a result.

nwohaibi commented 10 years ago

@MSommer MSommer/taggingJS fork solves the issue as suggested here.

dpenney commented 10 years ago

Just as a heads up but the @Msommer fork doesn't have the change applied to the minified code, works great though.