How to use single jquery function for a control that used multiple times on page?

How to use single jquery function for a control that used multiple times on page?

Hi,
I have created a control (user control), which contains one hyperlink and one input textbox with two buttons.
And I have written following code to hide and show text box onclick of hyperlink. It works fine when I use single controls on page.
  1. $(function () {
             $('div#divAddTag').add().css("display", "none");
         });

         $("a#addtag").click(function (event) {
             $('div#divAddTag'). add().css("display", "inline-block");
             $(this).add().css("display", "none");
         }); 






Now I want to use this control multiple times on page, but it acts correctly only for 1st control on page.

(Question will be How to use single jquery for user controls, that we use multiple times on page?)