Q: Pop-up contact form accessed globally from different pages jQuery Javascript I made a little pop-up contact form but unfortunately, once I copy it and paste elsewhere on the website (even same page), only one of the forms works, the second one does not open on click at all. I cannot spot the error...
I would appreciate any feedback. Thanks.
JS code
   $(function() { 
     $('.contact').click(function () {
     $('#contactForm').fadeIn();
   })

   $(document).mouseup(function (e) {
       var container = $("#contactForm");

   // when clicked out of the 'form window' it will fade out
   if (!container.is(e.target) 
        && container.has(e.target).length === 0) 
   {
   container.fadeOut();
   }
   });
});

And also my HTML
 <div class="contact">Contact</div>

       <div id="contactForm">

         <h1>Interested?</h1>
         <small>Get in touch and I will respond as quick as possible!</small>

         <form class="centerform" action="#">
           <input placeholder="Name" type="text" required />
           <input placeholder="Email" type="email" required />
           <input placeholder="Subject" type="text" required />
           <textarea placeholder="Comment"></textarea>
           <input class="formBtn" type="submit" />
           <input class="formBtn" type="reset" />
         </form>
       </div>

