aehlke / tag-it

A jQuery UI plugin to handle multi-tag fields as well as tag suggestions/autocomplete.
http://aehlke.github.com/tag-it/
MIT License
2.48k stars 826 forks source link

custom icon on the left #116

Open taroon opened 11 years ago

taroon commented 11 years ago

Is it possible to add a custom icon on the left? Can someone guide me on this please? Thanks.

aehlke commented 11 years ago

No, but feel free to add such a feature!

creativecat commented 11 years ago

Doesn't work this for you? beforeTagAdded: function(event, ui) { ui.tag.addClass('icon-tag'); }

aehlke commented 11 years ago

I may add something for this after all, but I'm not sure what the best method is... if anyone has an example of another lib that does this well I'd appreciate it.

taroon commented 11 years ago

here is an example: http://textextjs.com/manual/examples/tags-with-custom-rendering.html

aehlke commented 11 years ago

Thanks! Is there a need for it to be clickable too though? I'd rather it not.

Sent from my iPhone

On Dec 6, 2012, at 10:21 PM, taroon notifications@github.com wrote:

here is an example: http://textextjs.com/manual/examples/tags-with-custom-rendering.html

\ Reply to this email directly or view it on GitHub.

taroon commented 11 years ago

It would be great if its possible. The use case is to represent a group and the custom icon in this case would be a "+"

aehlke commented 11 years ago

Can you elaborate?

Sent from my iPhone

On Dec 8, 2012, at 9:51 PM, taroon notifications@github.com wrote:

It would be great if its possible. The use case is to represent a group and the custom icon in this case would be a "+"

\ Reply to this email directly or view it on GitHub.

taroon commented 11 years ago

The initial use case idea was to emulate Hotmail: When you choose a group to send email, the tag item appears with a "+" on the left of the label. When clicked, the tag item is "expanded" and replaced by individual tags as members of that group. This action is irreversible, once expanded, you can no longer collapse it.