title: Bootstrap Modals won't open
body: <p>I am writing a portfolio and part of it is in modals on the page. However, I <strong><em>CANNOT</em></strong> possibly get it to work for whatever reason. Here is the codepen: <a href="https://codepen.io/dmeskin/pen/GmvqxV" rel="nofollow noreferrer">https://codepen.io/dmeskin/pen/GmvqxV</a> (the modals are the Pottery &amp; Design Buttons) Or, here is the plain html if you want it &lt;3</p>
  
  <pre><code>&lt;div class="parallax"&gt;
    &lt;nav class="navbar navbar-default navbar-fixed-top"&gt;&lt;span class="navbar-toggler-icon"&gt;&lt;/span&gt;
      &lt;/button&gt;
      &lt;div class="container-fluid"&gt;
        &lt;div class="navbar-header"&gt;
  
        &lt;/div&gt;
        &lt;div class="collapse navbar-collapse" id="navbarSupportedContent"&gt;
          &lt;ul class="nav navbar-nav"&gt;
            &lt;li class="active"&gt;&lt;a href="/index.html"&gt;Home&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="#About"&gt;About&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="#Work"&gt;My Work&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="#testimonials"&gt;Testimonials&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="mailto:msmirnovany@gmail.com"&gt;Email Me&lt;/a&gt;
            &lt;li&gt;&lt;a href="http://www.marianna.htmltoy.com/home/"&gt;Pottery Blog&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;
  
  
          &lt;/ul&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/nav&gt;
    &lt;div class='content'&gt;
      &lt;br&gt;
      &lt;div class="container"&gt;
        &lt;div class="well" id="body"&gt;
          &lt;h1 class="text-primary text-center animated rollIn"&gt;Marianna Smirnova&lt;/h1&gt;
          &lt;div id="modals"&gt;
           &lt;!-- Trigger the modal with a button --&gt;
            &lt;button type="button" class=" center-block btn btn-info btn-lg" data-toggle="modal" data-target="#myModal"&gt;My Pottery&lt;/button&gt;
  
            &lt;!-- Modal --&gt;
            &lt;div id="myModal" class="modal fade" role="dialog"&gt;
              &lt;div class="modal-dialog"&gt;
  
                &lt;!-- Modal content--&gt;
                &lt;div class="modal-content center-block"&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"&gt;Pottery&lt;/h4&gt;
                  &lt;/div&gt;
                  &lt;div class="modal-body"&gt;
                    &lt;div class="bs-example"&gt;
                      &lt;div id="myCarousel" class="carousel slide" data-ride="carousel"&gt;
                        &lt;!-- Carousel indicators --&gt;
                        &lt;ol class="carousel-indicators"&gt;
                          &lt;li data-target="#myCarousel" data-slide-to="0" class="active"&gt;&lt;/li&gt;
                          &lt;li data-target="#myCarousel" data-slide-to="1"&gt;&lt;/li&gt;
                          &lt;li data-target="#myCarousel" data-slide-to="2"&gt;&lt;/li&gt;
                        &lt;/ol&gt;
                        &lt;!-- Wrapper for carousel items --&gt;
                        &lt;div class="carousel-inner"&gt;
                          &lt;div class="item active"&gt;
                            &lt;img src="http://marianna.htmltoy.com/home/_data/i/upload/2016/09/25/20160925132047-a7267d4c-me.jpg" alt="First Slide"&gt;
                          &lt;/div&gt;
                          &lt;div class="item"&gt;
                            &lt;img src="http://marianna.htmltoy.com/home/_data/i/upload/2016/09/25/20160925141914-b93d10c5-me.jpg" alt="Second Slide"&gt;
                          &lt;/div&gt;
                          &lt;div class="item"&gt;
                            &lt;img src="http://marianna.htmltoy.com/home/_data/i/upload/2016/09/25/20160925183344-36e1d48b-me.jpg" alt="Third Slide"&gt;
                          &lt;/div&gt;
                        &lt;/div&gt;
                        &lt;!-- Carousel controls --&gt;
                        &lt;a class="carousel-control left" href="#myCarousel" data-slide="prev"&gt;
                          &lt;span class="glyphicon glyphicon-chevron-left"&gt;&lt;/span&gt;
                        &lt;/a&gt;
                        &lt;a class="carousel-control right" href="#myCarousel" data-slide="next"&gt;
                          &lt;span class="glyphicon glyphicon-chevron-right"&gt;&lt;/span&gt;
                        &lt;/a&gt;
                      &lt;/div&gt;
                    &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class="modal-footer"&gt;
                    &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Close&lt;/button&gt;
                  &lt;/div&gt;
                &lt;/div&gt;
  
              &lt;/div&gt;
            &lt;/div&gt;
            &lt;!-- Trigger the modal with a button --&gt;
            &lt;button type="button" class=" center-block btn btn-info btn-lg" data-toggle="modal" data-target="#myModal1"&gt;My Design&lt;/button&gt;
            &lt;br&gt;
            &lt;!-- Modal --&gt;
            &lt;div id="myModal1" class="modal fade" role="dialog"&gt;
              &lt;div class="modal-dialog"&gt;
  
                &lt;!-- Modal content--&gt;
                &lt;div class="modal-content center-block"&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"&gt;Design&lt;/h4&gt;
                  &lt;/div&gt;
                  &lt;div class="modal-body"&gt;
                    &lt;div class="bs-example"&gt;
                      &lt;div id="myCarousel" class="carousel slide" data-ride="carousel"&gt;
                        &lt;!-- Carousel indicators --&gt;
                        &lt;ol class="carousel-indicators"&gt;
                          &lt;li data-target="#myCarousel" data-slide-to="0" class="active"&gt;&lt;/li&gt;
                          &lt;li data-target="#myCarousel" data-slide-to="1"&gt;&lt;/li&gt;
                          &lt;li data-target="#myCarousel" data-slide-to="2"&gt;&lt;/li&gt;
                        &lt;/ol&gt;
                        &lt;!-- Wrapper for carousel items --&gt;
                        &lt;div class="carousel-inner"&gt;
                          &lt;div class="item active"&gt;
                            &lt;img src="http://res.cloudinary.com/dmeskin/image/upload/v1493908232/320px-Image_To_Come_Later_tqqhjb.gif" alt="First Slide"&gt;
                          &lt;/div&gt;
                          &lt;div class="item"&gt;
                            &lt;img src="http://res.cloudinary.com/dmeskin/image/upload/v1493908232/320px-Image_To_Come_Later_tqqhjb.gif" alt="Second Slide"&gt;
                          &lt;/div&gt;
                          &lt;div class="item"&gt;
                            &lt;img src="http://res.cloudinary.com/dmeskin/image/upload/v1493908232/320px-Image_To_Come_Later_tqqhjb.gif" alt="Third Slide"&gt;
                          &lt;/div&gt;
                        &lt;/div&gt;
                        &lt;!-- Carousel controls --&gt;
                        &lt;a class="carousel-control left" href="#myCarousel" data-slide="prev"&gt;
                          &lt;span class="glyphicon glyphicon-chevron-left"&gt;&lt;/span&gt;
                        &lt;/a&gt;
                        &lt;a class="carousel-control right" href="#myCarousel" data-slide="next"&gt;
                          &lt;span class="glyphicon glyphicon-chevron-right"&gt;&lt;/span&gt;
                        &lt;/a&gt;
                      &lt;/div&gt;
                    &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class="modal-footer"&gt;
                    &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Close&lt;/button&gt;
                  &lt;/div&gt;
                &lt;/div&gt;
  
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/div&gt;
          &lt;div id="About"&gt;
            &lt;h3 class="text-primary"&gt; About&lt;/h3&gt;
            &lt;p&gt;Ancient alien aircraft DNA manipulation Chariot of the Gods, space travel Ezekiel Nazca lines kachina doll, astronaut mystery technology ancient alien foo fighter. Sanskrit Mahabharata helicopter heiroglyph targeted mutation ancient civilization
              Sumerian texts, Indian texts weightless astronaut earth mound Ezekiel golden disk, Sumerian texts space time burmuta triangle helicopter heiroglyph elongated skull. Vimana sanskrit Mayan mystery SETI cover up, magnetic current sanskrit otherworldly
              visitors pyramids sanskrit, pre-colonial aerodynamics Mayan DNA manipulation. Ancient alien theorists von Daniken aircraft mainstream archaelogy, I know it sounds crazy... Spaceships legendary times Machu Picchu pyramids, worm hole elongated
              skull astronaut earth mound. Petroglyph golden disk pyramids vortex aircraft UFO ancient religions, King Soloman crystal skull ancient civilization star gates, targeted mutation choral castle contend foo fighter. Targeted mutation cover up
              spaceships foo fighter DNA manipulation star gates portal, mystery sightings space time Nazca lines aircraft contend. Chariot of the Gods portal ancient alien theorists, otherworldly visitors King Soloman crystal skull mercury gods, burmuta
              triangle. I know it sounds crazy... Stonehenge Machu Picchu petroglyph star gates star gates flying vessels, sun disc technology UFO vortex space time extraterrestrial portal burmuta triangle. Aircraft space travel, the answer is a resounding
              YES... Stonehenge megoliths. Mayan Indian texts star gates astronaut grey, Nazca lines grey kachina doll anti-gravity, ancient alien theorists foo fighter. I know it sounds crazy... Flying vessels star people ancient civilization foo fighter
              Vymaanika-Shaastra Annunaki, mercury UFO Easter island helicopter heiroglyph star people Nazca lines. Star people earth mound otherworldly visitors Chariot of the Gods Vymaanika-Shaastra, vimana kachina doll crystal skull crystal skull pyramids
              mainstream archaelogy, ancient alien helicopter heiroglyph Nazca lines vortex petroglyph legendary times. Crystal skull DNA manipulation ancient civilization star people electromagnetic, space time Chariot of the Gods mainstream archaelogy
              pyramids, ancient god sanskrit mystery elongated skull. Mainstream archaelogy golden disk kachina doll space brothers SETI, otherworldly visitors ancient religions vimana, Nazca lines burmuta triangle otherworldly visitors SETI. Easter island
              technology grey extraterrestrial mainstream archaelogy flying vessels, aircraft astronaut I know it sounds crazy..., I know it sounds crazy... Space time. Worm hole sun disc Puma Punku anti-gravity aircraft sightings kachina doll, Sumerian
              texts extraterrestrial origin stonehenge elongated skull, sun disc extraterrestrial anti-gravity UFO ancient religions star gates. Extraterrestrial origin star gates UFO earth mound pyramids megoliths Indian texts, flying vessels ancient civilization
              Nazca lines megoliths Easter island mainstream archaelogy, Chariot of the Gods weightless DNA manipulation the vedas Machu Picchu. Ancient alien theorists aircraft otherworldly visitors Sumerian texts extraterrestrial origin, contend sanskrit
              sun disc star gates Mahabharata mystery. Legendary times weightless golden disk Indian texts NASA Ezekiel mainstream archaelogy, grey foo fighter worm hole earth mound King Soloman evidence, Machu Picchu Mayan space time cover up sun disc
              portal. UFO space time Machu Picchu grey, star gates targeted mutation spaceships. Ancient religions ancient alien aircraft sun disc flying vessels Giorgio Ezekiel grey SETI weightless petroglyph, Chariot of the Gods petroglyph sightings vimana
              choral castle inter-dimensional helicopter heiroglyph Machu Picchu. Anti-gravity NASA aircraft Giorgio sightings targeted mutation, the vedas anti-gravity weightless portal..&lt;/p&gt;
            &lt;div id="Work"&gt;
              &lt;h3 class="text-primary"&gt;My Work&lt;/h3&gt;
              &lt;p&gt;Leverage agile frameworks to provide a robust synopsis for high level overviews. Iterative approaches to corporate strategy foster collaborative thinking to further the overall value proposition. Organically grow the holistic world view of
                disruptive innovation via workplace diversity and empowerment. Bring to the table win-win survival strategies to ensure proactive domination. At the end of the day, going forward, a new normal that has evolved from generation X is on the
                runway heading towards a streamlined cloud solution. User generated content in real-time will have multiple touchpoints for offshoring. Capitalize on low hanging fruit to identify a ballpark value added activity to beta test. Override the
                digital divide with additional clickthroughs from DevOps. Nanotechnology immersion along the information highway will close the loop on focusing solely on the bottom line. Podcasting operational change management inside of workflows to establish
                a framework. Taking seamless key performance indicators offline to maximise the long tail. Keeping your eye on the ball while performing a deep dive on the start-up mentality to derive convergence on cross-platform integration. Collaboratively
                administrate empowered markets via plug-and-play networks. Dynamically procrastinate B2C users after installed base benefits. Dramatically visualize customer directed convergence without revolutionary ROI. Efficiently unleash cross-media
                information without cross-media value. Quickly maximize timely deliverables for real-time schemas. Dramatically maintain clicks-and-mortar solutions without functional solutions. Completely synergize resource taxing relationships via premier
                niche markets. Professionally cultivate one-to-one customer service with robust ideas. Dynamically innovate resource-leveling customer service for state of the art customer service. Objectively innovate empowered manufactured products whereas
                parallel platforms. Holisticly predominate extensible testing procedures for reliable supply chains. Dramatically engage top-line web services vis-a-vis cutting-edge deliverables. Proactively envisioned multimedia based expertise and cross-media
                growth strategies. Seamlessly visualize quality intellectual capital without superior collaboration and idea-sharing. Holistically pontificate installed base portals after maintainable products. Phosfluorescently engage worldwide methodologies
                with web-enabled technology. Interactively coordinate proactive e-commerce via process-centric "outside the box" thinking. Completely pursue scalable customer service through sustainable potentialities.&lt;/p&gt;
            &lt;/div&gt;
            &lt;div id="testimonials"&gt;
              &lt;h3 class="text-primary"&gt;Testimonials&lt;/h3&gt;
              &lt;p&gt;Lorem ipsum dolor sit amet, consectetuer adipiscing elit.&lt;/p&gt;
  
              &lt;p&gt;Aenean commodo ligula eget dolor. Aenean massa.&lt;/p&gt;
  
              &lt;p&gt;Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.&lt;/p&gt;
  
              &lt;p&gt;Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem.&lt;/p&gt;
  
              &lt;p&gt;Nulla consequat massa quis enim.&lt;/p&gt;
  
              &lt;p&gt;Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu.&lt;/p&gt;
  
              &lt;p&gt;In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo.&lt;/p&gt;
  
              &lt;p&gt;Nullam dictum felis eu pede mollis pretium.&lt;/p&gt;
  
              &lt;p&gt;Integer tincidunt. Cras dapibus.&lt;/p&gt;
  
              &lt;p&gt;Vivamus elementum semper nisi.&lt;/p&gt;
  
              &lt;p&gt;Aenean vulputate eleifend tellus.&lt;/p&gt;
  
              &lt;p&gt;Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim.&lt;/p&gt;
  
              &lt;p&gt;Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus.&lt;/p&gt;
  
              &lt;p&gt;Phasellus viverra nulla ut metus varius laoreet.&lt;/p&gt;
  
              &lt;p&gt;Quisque rutrum. Aenean imperdiet.&lt;/p&gt;
  
              &lt;p&gt;Etiam ultricies nisi vel augue.&lt;/p&gt;
  
              &lt;p&gt;Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus.&lt;/p&gt;
  
              &lt;p&gt;Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum.&lt;/p&gt;
  
              &lt;p&gt;Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem.&lt;/p&gt;
  
              &lt;p&gt;Maecenas nec odio et ante tincidunt tempus.&lt;/p&gt;
  
              &lt;p&gt;Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante.&lt;/p&gt;
  
              &lt;p&gt;Etiam sit amet orci eget eros faucibus tincidunt. Duis leo.&lt;/p&gt;
  
              &lt;p&gt;Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna.&lt;/p&gt;
  
              &lt;p&gt;Sed consequat, leo eget bibendum sodales, augue velit cursus nunc,&lt;/p&gt;
            &lt;/div&gt;
  
  
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;style&gt;
  .carousel {
    background: #fff;
    margin-top: 20px;
  }
  
  .carousel .item img {
    margin: 0 auto;
    /* Align slide image horizontally center */
  }
  
  .bs-example {
    margin: 20px;
  }
  
  .parallax {
    /* The image used */
    background-image: url("http://res.cloudinary.com/dmeskin/image/upload/v1493909616/1482247060_iStock-120660750_bvttju.jpg");
    /* Full height */
    height: 100%;
    /* Create the parallax scrolling effect */
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
  }
  
  
  /* Turn off parallax scrolling for tablets and phones. Increase the pixels if needed */
  
  @media only screen and (max-device-width: 1024px) {
    .parallax {
      background-attachment: scroll;
    }
  }
  &lt;/style&gt;
  &lt;script&gt;
  $(window).on("scroll", function() {
    if ($(".scroller").is(":visible")) {
      $(".scroller").delay(1000).addClass("bounceInDown");
    }
  });
  // Smooth scroll for in page links - http://wibblystuff.blogspot.in/2014/04/in-page-smooth-scroll-using-css3.html
  // Improvements from - http://codepen.io/kayhadrin/pen/KbalA
  
  $(function() {
    var $window = $(window),
      $document = $(document),
      transitionSupported =
        typeof document.body.style.transitionProperty === "string", // detect CSS transition support
      scrollTime = 1; // scroll time in seconds
  
    $(document).on("click", "a[href*=#]:not([href=#])", function(e) {
      var target, avail, scroll, deltaScroll;
  
      if (
        location.pathname.replace(/^\//, "") ==
          this.pathname.replace(/^\//, "") &amp;&amp;
        location.hostname == this.hostname
      ) {
        target = $(this.hash);
        target = target.length ? target : $("[id=" + this.hash.slice(1) + "]");
  
        if (target.length) {
          avail = $document.height() - $window.height();
  
          if (avail &gt; 0) {
            scroll = target.offset().top;
  
            if (scroll &gt; avail) {
              scroll = avail;
            }
          } else {
            scroll = 0;
          }
  
          deltaScroll = $window.scrollTop() - scroll;
  
          // if we don't have to scroll because we're already at the right scrolling level,
          if (!deltaScroll) {
            return; // do nothing
          }
  
          e.preventDefault();
  
          if (transitionSupported) {
            $("html")
              .css({
                "margin-top": deltaScroll + "px",
                transition: scrollTime + "s ease-in-out"
              })
              .data("transitioning", scroll);
          } else {
            $("html, body")
              .stop(true, true) // stop potential other jQuery animation (assuming we're the only one doing it)
              .animate(
                {
                  scrollTop: scroll + "px"
                },
                scrollTime * 1000
              );
  
            return;
          }
        }
      }
    });
  
    if (transitionSupported) {
      $(
        "html"
      ).on(
        "transitionend webkitTransitionEnd msTransitionEnd oTransitionEnd",
        function(e) {
          var $this = $(this), scroll = $this.data("transitioning");
  
          if (e.target === e.currentTarget &amp;&amp; scroll) {
            $this.removeAttr("style").removeData("transitioning");
  
            $("html, body").scrollTop(scroll);
          }
        }
      );
    }
  });
  $(document).ready(function() {
    $("img.a").hover(
      function() {
        $(this).stop().animate(
          {
            opacity: "0"
          },
          "slow"
        );
      },
      function() {
        $(this).stop().animate(
          {
            opacity: "1"
          },
          "slow"
        );
      }
    );
  });
  
  $(document).ready(function() {
    $("#navigation a, #fixedbar a").on("click", function(e) {
      e.preventDefault();
    });
  
    $(window).on("scroll", function() {
      var scrolltop = $(this).scrollTop();
  
      if (scrolltop &gt;= 215) {
        $("#fixedbar").fadeIn(250);
      } else if (scrolltop &lt;= 210) {
        $("#fixedbar").fadeOut(250);
      }
    });
  });
  
    $(document).ready(function() {
      $("#MyModal").modal();
    });
  &lt;/script&gt;
  </code></pre>
  
  <p>Thanks for all the help!
  --- Updated the code, a fork of the code is here:<a href="https://codepen.io/dmeskin/pen/EmLxqa" rel="nofollow noreferrer">https://codepen.io/dmeskin/pen/EmLxqa</a> ---</p>
  
  <p>Only 1 modal opens now, the slider doesn't work and the other one is sitting there like a dead rat.</p>