title: jQuery onclick modal
body: <p>I have created a form modal using jQuery:</p>
  
  <pre><code>&lt;ul class="loginbar pull-right"&gt;
      &lt;li class="hoverSelector"&gt;
          &lt;i class="fa fa-globe"&gt;&lt;/i&gt; 
          &lt;a href=""&gt;Help&lt;/a&gt;
      &lt;/li&gt;
      &lt;li class="topbar-devider"&gt;
      &lt;/li&gt;
      &lt;li id="id1 "&gt;
          &lt;a href="#"&gt; Register&lt;/a&gt;
      &lt;/li&gt;
      &lt;li class="topbar-devider"&gt;
      &lt;/li&gt;
      &lt;li&gt;
          &lt;a&gt;Login&lt;/a&gt;
      &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>Form code</p>
  
  <pre><code>&lt;div class="container"&gt;
      &lt;div class="modal fade" id="myModal" role="dialog"&gt;
          &lt;div class="modal-dialog"&gt;
              &lt;div class="modal-content"&gt;
                  &lt;div class="modal-header"&gt;
                      &lt;button type="button" class="close" data-dismiss="modal"&gt;&amp;times;&lt;/button&gt;
                      &lt;h4 class="modal-title" style="color: #f4a742"&gt;Register a new account&lt;/h4&gt;
                  &lt;/div&gt;
                  &lt;div class="modal-body"&gt;
                      &lt;div class="container content"&gt;
                          &lt;div class="row"&gt;
                              &lt;div class="col-md-6 "&gt;
                                  &lt;form class="reg-page" id="RegID"&gt;
                                      &lt;div class="form-group"&gt;
                                          &lt;div class="form-group internal"&gt;
                                              &lt;label&gt;First Name&lt;/label&gt; &lt;input type="text" name="fname"
                                                  class="form-control margin-bottom-20"&gt;
                                          &lt;/div&gt;
                                      &lt;/div&gt;
                                      &lt;div class="form-group"&gt;
                                          &lt;div class="form-group internal"&gt;
                                              &lt;label&gt;Last Name&lt;/label&gt; &lt;input type="text" name="lname"
                                                  class="form-control margin-bottom-20"&gt;
                                          &lt;/div&gt;
                                      &lt;/div&gt;
                                      &lt;div class="form-group"&gt;
                                          &lt;div class="form-group internal"&gt;
                                              &lt;label&gt;Email Address &lt;span class="color-red"&gt;*&lt;/span&gt;&lt;/label&gt;
                                              &lt;input type="text" name="email"
                                                  class="form-control margin-bottom-20"&gt;
                                          &lt;/div&gt;
                                      &lt;/div&gt;
                                      &lt;hr&gt;
                                      &lt;div class="row"&gt;
                                          &lt;div class="col-lg-6 checkbox"&gt;
                                              &lt;label&gt; &lt;input type="checkbox"&gt; I read &lt;a
                                                  href="page_terms.html" class="color-green"&gt;Terms and
                                                      Conditions&lt;/a&gt;
                                              &lt;/label&gt;
                                          &lt;/div&gt;
                                          &lt;div class="col-lg-6 text-right"&gt;
                                              &lt;button class="btn-u" type="submit"&gt;Register&lt;/button&gt;
                                          &lt;/div&gt;
                                      &lt;/div&gt;
                                  &lt;/form&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                      &lt;/div&gt; &lt;!-- end content --&gt;
                  &lt;/div&gt; &lt;!-- end modal-body --&gt;
              &lt;/div&gt; &lt;!-- end modal-content --&gt;
          &lt;/div&gt; &lt;!-- end modal-dialog --&gt;
      &lt;/div&gt; &lt;!-- end modal --&gt;
  &lt;/div&gt; &lt;!-- end container --&gt;
  
  &lt;script&gt;
  $( "#id1" ).click(function() {
        $( "#myModal" ).click();
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>It seems everything is okay for me, initial it was work but suddenly it is giving trouble, so what would be the mistake. </p>
  
  <p>When ever I have click on register it is not pop-up the form, could you please let me know what mistake I have done. </p>