title: how to fix jquery error "Uncaught TypeError: Cannot read property 'style' of undefined" for blue-imp gallery in modal Bootstrap?
body: <p>I used bootstrap 3 and blueimp-gallery in a web html5. My problem is a carousel-gallery dont show images and receive a error in a console "Uncaught TypeError: Cannot read property 'style' of undefined" when i use a blueimp-gallery-carousel in a modal div, but if i enter in a developer tools for chrome, this error disappears, and the images show in carousel-gallery.  </p>
  
  <p>The code.</p>
  
  <pre><code>&lt;!-- Portfolio Modals --&gt;
  &lt;!-- Use the modals below to showcase details about your portfolio projects! --&gt;
  
  &lt;!-- Portfolio Modal 1 --&gt;
  &lt;div class="portfolio-modal modal fade" id="portfolioModal1" tabindex="-1" role="dialog" aria-hidden="true"&gt;
      &lt;div class="modal-content"&gt;
          &lt;div class="close-modal" data-dismiss="modal"&gt;
              &lt;div class="lr"&gt;
                  &lt;div class="rl"&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="container"&gt;
              &lt;div class="row"&gt;
                      &lt;div class="col-lg-8 col-lg-offset-2"&gt;
                          &lt;div class="modal-body"&gt;
                              &lt;h2&gt;Vinilos&lt;/h2&gt;
                              &lt;div id="links"&gt;
                                  &lt;a href="images/productos/vinilos/02.jpg" title="Banana"&gt;1&lt;/a&gt;
                                  &lt;a href="images/productos/vinilos/03.jpg" title="Apple"&gt;2&lt;/a&gt;
                                  &lt;a href="images/productos/vinilos/04.jpg" title="Orange"&gt;3&lt;/a&gt;
                                  &lt;a href="images/productos/vinilos/05.jpg" title="Banana"&gt;&lt;/a&gt;
                                  &lt;a href="images/productos/vinilos/06.jpg" title="Apple"&gt;&lt;/a&gt;
                                  &lt;a href="images/productos/vinilos/07.jpg" title="Orange"&gt;&lt;/a&gt;
                              &lt;/div&gt;
  
                              &lt;div id="blueimp-gallery-carousel" class="blueimp-gallery blueimp-gallery-carousel blueimp-gallery-controls"&gt;
                                  &lt;div class="slides"&gt;&lt;/div&gt;
                                  &lt;h3 class="title"&gt;&lt;/h3&gt;
                                  &lt;a class="prev"&gt;‹&lt;/a&gt;
                                  &lt;a class="next"&gt;›&lt;/a&gt;
                                  &lt;a class="play-pause"&gt;&lt;/a&gt;
                                  &lt;ol class="indicator"&gt;&lt;/ol&gt;
                              &lt;/div&gt;
  
                              &lt;p&gt;Vinilos para rotulacion, decorativos, efecto espejo, fibra de carbono, refractivos, hologramas y farolas&lt;/p&gt;
                              &lt;button type="button" class="btn btn-primary" data-dismiss="modal"&gt;&lt;i class="fa fa-times"&gt;&lt;/i&gt; Cerrar Producto&lt;/button&gt;                        
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>and my javascript</p>
  
  <pre><code>&lt;script&gt;
      document.getElementById('links').onclick = function (event) {
        event = event || window.event;
        var target = event.target || event.srcElement,
          link = target.src ? target.parentNode : target,
          options = {index: link, event: event},
          links = this.getElementsByTagName('a');
        blueimp.Gallery(links, options);
  
      };
  &lt;/script&gt;
  
  &lt;script&gt;
      blueimp.Gallery(
          document.getElementById('links').getElementsByTagName('a'),
          {
              container: '#blueimp-gallery-carousel',
              carousel: true,
          }
      );
  &lt;/script&gt;
  </code></pre>
  
  <p>and the link web problem</p>
  
  <p><a href="http://www.colombiawaterprint.com/web/index3.html" rel="nofollow">http://www.colombiawaterprint.com/web/index3.html</a></p>
  
  <p>How i Solve this error?</p>