To do this just use a comma (a.k.a. the multiple selector), this works for any number of selectors.
$("#Tags, #Tags2").tagSuggest({
separator: ", ",
tagContainer: 'div',
tags: ["tag1","tag2"] });
});
There's a list of all selectors here and a good start-up tutorial you should check out here.
There's another approach, not needed for your example really, but if you had a lot of elements you wanted to match, or an unknown number, etc...then use a class, like this:
<div class="tags"></div>
And you can select all elements that have that class using the .class
selector, like this:
$(".tags").tagSuggest({
separator: ", ",
tagContainer: 'div',
tags: ["tag1","tag2"] });
});
Nick Craver
2010-05-31 10:53:46