title: The modal is not working in Bootstrap
body: <p>I'm building a website by using Bootstrap and when i tried to use modal it didn't work me! I mean it didn't pop-up. I've searched every single solution but couldn't solve it. Then I found</p>
  
  <p>Best Regards</p>
  
  <pre><code>&lt;div class="modal fade" id="myModal"&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;&lt;span aria-hidden="true"&gt;×&lt;/span&gt;&lt;span class="sr-only"&gt;Close&lt;/span&gt;&lt;/button&gt;
                  &lt;h4 class="modal-title" id="myModalLabel"&gt;&lt;i class="fa fa-envelope"&gt;&lt;/i&gt;Subscribe to our Mailing List&lt;/h4&gt;
              &lt;/div&gt;&lt;!--modal header--&gt;
              &lt;div class="modal-body"&gt;
                  &lt;p&gt;Simply enter your name and email! As a thank you for joining us, we're going to give you one of our best-selling courses, &lt;em&gt;for free!&lt;/em&gt;&lt;/p&gt;
                  &lt;form class="form-inline" role="form"&gt;
                      &lt;div class="form-group"&gt;
                          &lt;label class="sr-only" for="subscribe-name"&gt;Your first name&lt;/label&gt;
                          &lt;input type="text" class="form-control" id="subscribe-name" placeholder="Your first name"&gt;
                      &lt;/div&gt;&lt;!--form group--&gt;
                  &lt;/form&gt;&lt;!--form--&gt;
                  &lt;form class="form-inline" role="form"&gt;
                      &lt;div class="form-group"&gt;
                          &lt;label class="sr-only" for="subscribe-email"&gt;and your email&lt;/label&gt;
                          &lt;input type="text" class="form-control" id="subscribe-email" placeholder="and your email"&gt;
                      &lt;/div&gt;&lt;!--form group--&gt;
                      &lt;input type="submit" class="btn btn-danger" value="Subscribe!"&gt;
                  &lt;/form&gt;&lt;!--form--&gt;
                  &lt;hr&gt;
                  &lt;p&gt;&lt;small&gt;By providing your email you consent to receiving occosional promotional emails &amp; newsletter. &lt;br&gt;No Spam. Just good stuff. We respect your privacy &amp; you may unsubscribe at any time.&lt;/small&gt;&lt;/p&gt;
              &lt;/div&gt;&lt;!--modal-body--&gt;
          &lt;/div&gt;&lt;!--modal-content--&gt;
      &lt;/div&gt;&lt;!--modal-dialog--&gt;
   &lt;/div&gt;&lt;!--modal--&gt;
  
  
  
  &lt;!--BOOTSTRAP CORE JAVASCRIPT
     ==========================--&gt;
     &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"&gt;&lt;/script&gt;
     &lt;script src="assets/js/jquery-2.2.4.min.js"&gt;&lt;/script&gt;
     &lt;script src="assets/js/bootstrap.min.js"&gt;&lt;/script&gt;
     &lt;script src="assets/js/main.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>Then I found this code and added my "main.js" file then it worked fine but after this when I use my webpage on phone and click on the right top it opened modal instead of opening navbar. Here is the image!</p>
  
  <p><a href="https://i.stack.imgur.com/H6SWa.png" rel="nofollow noreferrer">You can find what I meant here!</a></p>
  
  <p>PS: Sorry if i make any misspelling!</p>
  
  <pre><code>$('button').click(function(){
   $('#myModal').modal('show');
  });
  </code></pre>