loopj/jquery-tokeninput — Issue #207: jQuery-tokeninput with Primefaces
Author: smetarom
Created: 2011-11-05 15:27:53+00:00
State: open

Hi,
I have jsf application and I use Primefaces(http://www.primefaces.org/) there. Because in primefaces is not any multiple autocomplete, I have decided to use this jQuery plugin. But there was conflict in $.

I read javascript code and I saw, that you try to prevent conflict by using:
(function ($) {
...
}(jQuery));
But it doesn't work in my app. And I think, there is typo and there should be })(jQuery); insted of }(jQuery)); But this didn't help me.

So I have changed protection in this way:
jQuery.noConflict()(function(){
...
});
and it works.

So this is my suggestion to improve this awesome plugin. But I am not sure, that it doesn't break compatibility with other frameworks and other technologies.

Roman