jquery - How to reference two div elements for a single function?

Posted by Ben on Stack Overflow See other posts from Stack Overflow or by Ben
Published on 2010-05-31T10:50:56Z Indexed on 2010/05/31 10:52 UTC
Read the original article Hit count: 197

Filed under:
|
|
|
|

I Have a function that references a specific input text box. I would like to extend the function to be used by two specific input text boxes. Rather than duplicate the code for the other text box, can anyone advise on how to reference the other?

Here it uses #Tags, but if i wanted it to reference #Tags2 also, how could I do that?

$(function () {

$('#Tags').tagSuggest({ separator: ", ", tagContainer: 'div', tags: ["tag1","tag2"] }); });

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about function