title: Elastic_Grid | "Uncaught TypeError: Cannot read property 'toLowerCase' of undefined"
body: <p>Putting together a personal &amp; project portfolio, and trying to use Vu Khanh Truong's "elastic_grid" jQuery plugin for the actual portfolio. You can view it <a href="https://github.com/vukhanhtruong/jquery-elastic-grid" rel="nofollow noreferrer">here</a>.  The problem is that it seems to be causing the following errors on my page:</p>
  
  <p><strong>1) I have a header for the portfolio section, and when I load the page with the plugin running, it makes my header disappear.</strong></p>
  
  <p><strong>2) There're supposed to be filtering buttons that appear based on different tags used to categorize your content, and those don't appear.</strong></p>
  
  <p><strong>3) It loads the preview thumbnail images for the different categories I'm using, but when I click on them, it doesn't load the modal with the full-size images (and descriptions) as it's supposed to.</strong></p>
  
  <p>When I open the console in Chrome, I get this error:</p>
  
  <p><code><strong>Uncaught TypeError: Cannot read property 'toLowerCase' of undefined</strong></code></p>
  
  <p>I tried creating a JSFiddle to post to replicate the problem I'm having, but I guess JSFiddle doesn't let you use certain scripts or something? 'Cuz whenever I try to include all of the scripts I'm using on the page, it gives me <strong>MIME type</strong> errors in the console. </p>
  
  <p>I've installed &amp; am using the plugin according to the documentation, and I'm not the best at de-constructing Javascript, so I can't figure out why I'm getting these errors. :P If anybody can help, I would appreciate it. </p>
  
  <h1>HTML</h1>
  
  <pre><code>&lt;!-- "DOCTYPE" Declaration --&gt;
  &lt;!DOCTYPE HTML&gt;
  
  &lt;!-- Start HTML --&gt;
  &lt;html lang="en"&gt;
  
      &lt;!-- Start HTML Header --&gt;
      &lt;head&gt;
          &lt;title&gt;My Portfolio&lt;/title&gt;
  
          &lt;!-- Stylesheets --&gt;
          &lt;link href="bootstrap/css/bootstrap.css" rel="stylesheet" type="text/css" /&gt;&lt;!-- Bootstrap.css --&gt;
          &lt;link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" /&gt;&lt;!-- Font-Awesome --&gt;
          &lt;link href="elastic/css/elastic_grid.min.css" rel="stylesheet" type="text/css" /&gt;&lt;!-- Elastic CSS --&gt;
          &lt;link href="mycss.css" rel="stylesheet" type="text/css" /&gt;&lt;!-- Custom CSS --&gt;
  
          &lt;!--Javascripts --&gt;
          &lt;script src="jquery/jquery.js"&gt;&lt;/script&gt;&lt;!-- jQuery --&gt;
          &lt;script src="bootstrap/js/bootstrap.js"&gt;&lt;/script&gt;&lt;!-- Bootstrap jQuery --&gt;
          &lt;script src="jquery/jquery.scrollTo.js"&gt;&lt;/script&gt;&lt;!-- "scrollTo" Smooth Scrolling jQuery plugin --&gt;
          &lt;!-- Elastic --&gt;
          &lt;script src="elastic/js/modernizr.custom.js"&gt;&lt;/script&gt;&lt;!-- Modernizr --&gt;
          &lt;script src="elastic/js/classie.js"&gt;&lt;/script&gt;&lt;!-- Classie --&gt;
          &lt;script src="elastic/js/elastic_grid.min.js"&gt;&lt;/script&gt; &lt;!-- Elastic --&gt;
          &lt;!-- Initializing &amp; Customizing JS --&gt;
          &lt;script src="js/my.js"&gt;&lt;/script&gt;&lt;!-- Personal Javascript for initializing &amp; using Javascript &amp; jQuery plugins --&gt;
  
      &lt;/head&gt;
  
      &lt;!-- Start Page Body --&gt;
      &lt;body data-spy="scroll" data-target="#topNav" data-offset="75"&gt;
  
          &lt;!-- Start Navigation --&gt;
          &lt;nav id="topNav" class="navbar navbar-inverse navbar-fixed-top" role="navigation"&gt;
  
              &lt;div class="navbar-header"&gt; 
  
                  &lt;div class="navbar-collapse collapse " id="myNavbar" role="navigation"&gt;
  
                  &lt;!-- Site Logo --&gt;
                  &lt;a href="#home"&gt;&lt;img src="imgs/logo_ph.png" alt="Logo placeholder" class="navbar-brand img-responsive" /&gt;&lt;/a&gt;
  
                  &lt;!-- Start Navbar Links --&gt;
                  &lt;button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar"&gt;
                      &lt;span class="icon-bar"&gt;&lt;/span&gt;
                      &lt;span class="icon-bar"&gt;&lt;/span&gt;
                      &lt;span class="icon-bar"&gt;&lt;/span&gt;                        
                  &lt;/button&gt;
  
                  &lt;ul class="nav navbar-nav navbar-right nav-pills"&gt;
                      &lt;li role="presentation"&gt;&lt;a href="#about"&gt;About Me&lt;/a&gt;&lt;/li&gt;
                      &lt;li role="presentation"&gt;&lt;a href="#portfolio"&gt;Portfolio&lt;/a&gt;&lt;/li&gt;
                      &lt;li role="presentation"&gt;&lt;a href="#contact"&gt;Contact Me&lt;/a&gt;&lt;/li&gt;
                      &lt;li role="presentation"&gt;&lt;a href="#footer"&gt;&lt;i class="text-center fa fa-angle-double-down fa-lg"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
                  &lt;/ul&gt;
  
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/nav&gt;
          &lt;!-- End Navigation --&gt;
  
          &lt;!-- Start Site Container --&gt;
          &lt;div class="container container-fluid" id="home"&gt;
  
              &lt;br&gt;&lt;br&gt;
  
              &lt;!-- Start "About Me" Section --&gt;
              &lt;section id="about" class="secB center-block"&gt;
                  &lt;h1 class="text-center"&gt;About Me&lt;/h1&gt;
                  &lt;br&gt;&lt;br&gt;
                  &lt;img class="me-left" src="imgs/me-1.png" alt="Me" /&gt;
                  &lt;p&gt;This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  &lt;img class="me-right" src="imgs/me-1.png" alt="Me" /&gt;
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text &lt;/p&gt;
              &lt;div class="clearfix"&gt;&lt;/div&gt;
              &lt;/section&gt;
              &lt;!-- End "About Me" Section --&gt;
  
              &lt;!-- Start "Portfolio" Section --&gt;
              &lt;section id="portfolio" class="secA center-block"&gt;
                  &lt;h1 class="text-center"&gt;Sample Work&lt;/h1&gt;
                  &lt;br&gt;&lt;br&gt;
                  &lt;div id="portfolio"&gt;
  
                      &lt;script type="text/javascript"&gt;
  
      $(function(){
  
          $("#portfolio").elastic_grid({
              'filterEffect': 'fallperspective',
              'hoverDirection': true,
              'hoverDelay': 0,
              'hoverInverse': false,
              'expandingSpeed': 500,
              'expandingHeight': 500,
                  'items' :
                  [
                      {
                          'title'         : 'Covers',
                          'description'   : ' A collection of media covers I\'ve designed',
                          'thumbnail'     : ['imgs/covers/s/1.jpg', 'imgs/covers/s/2.jpg'],
                          'large'         : ['imgs/covers/l/1.jpg', 'imgs/covers/l/2.jpg'],
                          'button_list'   :
                          [
                              { 'title':'Demo', 'url' : 'http://bonchen.net/' },
                              { 'title':'Download', 'url':'http://porfolio.bonchen.net/'}
                          ],
                          'tags'          : ['Covers']
                      },
                       {
                          'title'         : 'Logos',
                          'description'   : ' A collection of business logos I\'ve designed',
                          'thumbnail'     : ['imgs/logos/s/1.jpg', 'imgs/logos/s/2.jpg'],
                          'large'         : ['imgs/logos/l/1.jpg', 'imgs/logos/l/2.jpg'],
                          'button_list'   :
                          [
                              { 'title':'Demo', 'url' : 'http://bonchen.net/' },
                              { 'title':'Download', 'url':'http://porfolio.bonchen.net/'}
                          ],
                          'tags'          : ['Logos']
                      }
                  ]
          });
      });
  &lt;/script
  
  
                  &lt;/div&gt;
              &lt;/section&gt;
              &lt;!-- End "Portfolio" Section --&gt;
  
              &lt;!-- Start "Contact" Section --&gt;
              &lt;section id="contact" class="secB center-block"&gt;
              &lt;h1 class="text-center"&gt;Hire Me!&lt;/h1&gt;
              &lt;h5 class="text-center"&gt;...or you know...just HMU to chat. :P&lt;/h5&gt;
                  &lt;br&gt;&lt;br&gt;
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
  This is some text This is some text This is some text This is some text This is some text This is some text 
                  &lt;/section&gt;
              &lt;!-- End "Contact" Section --&gt;
  
  
          &lt;!-- End Site Container --&gt;
          &lt;/div&gt;
  
              &lt;!-- Start "Footer" Section --&gt;
                  &lt;footer class="footer center-block" id="footer"&gt;
  
                      &lt;!-- Footer Content--&gt;
                      &lt;div class="footer-content"&gt;
  
                          &lt;!-- Footer text --&gt;
                          &lt;div class="footer-text text-center"&gt;
                              &lt;span class="text-primary"&gt;Port-FAUX-lio&lt;/span&gt; | &amp;copy; Husayn Muhammad 2016
                          &lt;/div&gt;
  
                          &lt;!-- Social Media --&gt;
                          &lt;div class="footer-icons-box text-center"&gt;
                              &lt;div class="fa-stack fa-2x sm-icon"&gt;
                                  &lt;a href="mailto:cloud4xL@gmail.com"&gt;
                                      &lt;i class="fa fa-circle fa-stack-2x"&gt;&lt;/i&gt;
                                      &lt;i class="fa fa-envelope fa-stack-1x fa-inverse"&gt;&lt;/i&gt;
                                  &lt;/a&gt;
                              &lt;/div&gt;
                              &lt;div class="fa-stack fa-2x sm-icon"&gt;
                                  &lt;a href="http://twitter.com/cloud4xL" target="_blank"&gt;
                                      &lt;i class="fa fa-circle fa-stack-2x"&gt;&lt;/i&gt;
                                      &lt;i class="fa fa-twitter fa-stack-1x fa-inverse"&gt;&lt;/i&gt;
                                  &lt;/a&gt;
                              &lt;/div&gt;
                              &lt;div class="fa-stack fa-2x sm-icon"&gt;
                                  &lt;a href="http://freecodecamp.com/cloud4xL" target="_blank"&gt;
                                      &lt;i class="fa fa-circle fa-stack-2x"&gt;&lt;/i&gt;
                                      &lt;i class="fa fa-free-code-camp fa-stack-1x fa-inverse"&gt;&lt;/i&gt;
                                  &lt;/a&gt;
                              &lt;/div&gt;
                              &lt;div class="fa-stack fa-2x sm-icon"&gt;
                                  &lt;a href="https://www.linkedin.com/in/husayn-muhammad-040614106?trk=nav_responsive_tab_profile" target="_blank"&gt;
                                      &lt;i class="fa fa-circle fa-stack-2x"&gt;&lt;/i&gt;
                                      &lt;i class="fa fa-linkedin fa-stack-1x fa-inverse"&gt;&lt;/i&gt;
                                  &lt;/a&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
  
                          &lt;div class="clearfix"&gt;&lt;/div&gt;    
  
                      &lt;/div&gt;
                  &lt;/footer&gt;
                  &lt;!-- End "Footer" Section --&gt;
  
      &lt;!-- End Body --&gt;
      &lt;/body&gt;
  
      &lt;!-- End HTML --&gt;
  &lt;/html&gt;
  </code></pre>
  
  <h1>CSS</h1>
  
  <pre><code>body {
  
      background-color: #e1e1e1;
      min-width: 430px !important;
  
  }
  
  /****** TOP NAVIGATION STYLES ******/
  
  .navbar {
  
      background-color: #f2f2f2 !important; /*#190c03*/
      box-shadow: 0 1px 2px 2px rgba(0, 0, 0, 0.5);
  
  }
  
  .navbar-brand {
  
      float: left !important;
      height: auto !important;
      transform: translateX(0);
      opacity: 1;
      transition: transform 0.4s, opacity 0.4s;
  
  }
  
  .navbar-brand:hover {
  
      transform: translateX(25px);
      opacity: 0;
      transition: transform 0.4s, opacity 0.4s;
  
  }
  
  .navbar-right {
  
      margin-right: 15px !important;
  
  }
  
  .navbar-header {
  
      position: relative !important;
      float: left !important;
      width: 100% !important;
  
  }
  
  .navbar-toggle {
  
      /* margin-top: 0px !important; */
  
  }
  
  .navbar ul {
  
      float: right !important;
  
  }
  
  .nav-pills &gt; li {
  
      border: 1px solid rgba(0, 0, 0, 0.4);
      background-color: #d8661A;
      border-radius: 5px;
      margin-top: 3.5%;
      margin-right: 5px;
      box-shadow: 0 4px 2px 0 rgba(0, 0, 0, 0.4);
      transform: scale(1, 1);
      transition: box-shadow 0.4s, transform 0.4s;
  
  }
  
  .nav-pills &gt; li:hover {
  
      transform: translateY(-5px);
      border: 1px solid rgba(0, 0, 0, 0.7);
      transition: transform 0.4s, border 0.4s;
  
  }
  
  .navbar-inverse .navbar-nav &gt; .active &gt; a {
  
      background-color: transparent !important;
  
  }
  
  .nav-pills &gt; li.active {
  
      transform: translateY(-5px);
      height: 50%;
      border: 1px solid rgba(0, 0, 0, 0.7);
      color: white !important;
      background-color: #337ab7 !important;
      transition: transform 0.4s, color 0.4s, background-color 0.4s;
  
  }
  
  .nav-pills &gt; li a {
  
      color: white !important;
      border-bottom: 1px solid transparent !important;
      transition: color 0.4s, border-bottom 0.4s !important;
  
  }
  
  
  .nav-pills &gt; li.active &gt; a:hover {
  
      color: white !important;
  
  }
  
  /****** HEADER IMAGE STYLES ******/
  
  .mast {
  
      width: auto;
      position: relative;
      height: 600px;
      margin-top: 7%;
      margin-bottom: 2%; 
      /* box-shadow: 0 4px 2px 0px rgba(0, 0, 0, 0.7); */
  
  }
  
  /****** &lt;SECTION&gt; STYLES ******/
  
  .secA, .secB {
  
      width: auto;
      min-height: 400px;
      height: auto;
      padding: 4% 10% 8%;
      border-left: 1px solid rgba(255, 255, 255, 0.1);
      border-right: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .secA {
  
      background-color: rgba(0, 0, 0, 0.4);
      overflow: auto !important;
      border-top: 1px solid rgba(0, 0, 0, 0.2);
      border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  
  }
  
  .secB {
  
      background-color: rgba(0, 0, 0, 0.2);
  
  }
  
  /****** ABOUT ME SECTION STYLES ******/
  
  .me-left {
  
      float: left; 
      max-height: 200px; 
      border: 5px solid black; 
      border-radius: 50%; 
      padding-left: 8px; 
      margin: 10px 10px 10px 0px;
      background-color: white; 
      transform: scaleX(-1);
  
  }
  
  .me-right {
  
  
      float: right; 
      max-height: 200px; 
      border: 5px solid black; 
      border-radius: 50%; 
      padding-left: 8px; 
      margin: 10px 0px 10px 10px;
      background-color: white
  
  }
  
  /*********************************
  
  **********sdFilterMe CSS**********
  
  #sdfm-wrapper img, 
  .sdfm-overlay {
  
      //Define the WIDTH of sdFilterMe Images 
      width: 200px !important;
      //Define the HEIGHT of sdFilterMe Images
      height: 200px !important;
      border-radius: 7px;
      overflow: hidden !important;
  
  }
  
  .sdfm-inner-wrapper {
  
      border-radius: 10px;
      margin: 5px !important;
  
  }
  
  .sdfm-overlay {
  
      background-color: rgba(0, 0, 0, 0.7) !important;
      color: white !important;
      font-size: 0.35em !important;
      text-overflow: clip !important;
  
  }
  
  .sdfm-overlay span {
  
      padding: 5% !important;
      margin: 8% auto !important;
      max-width: 85% !important;
      height: auto !important;
      word-wrap: break-word !important;
      border-radius: 2px !important;
  
  }
  
  *********************************/
  
  /****** FOOTER STYLES ******/
  
  .footer {
  
      width: auto;
      /* min-height: 150px; */
      /*margin-bottom: 5px !important;*/
      background-color: #1b1d1e;
      padding: 1.5% 5%;
      z-index: 3;
      border-top: 1px solid red;
  
  }
  
  .footer-content {
  
      /* border: 1px solid yellow; */
      margin: 0 auto;
      padding: 10px;
      display: flex;
      flex-flow: row wrap;
      justify-content: center;
  
  }
  
  .footer-text {
  
      font-size: 1.5em;
      font-weight: normal;
      color: rgba(255, 255, 255, 0.7);
      /* border: 1px solid white; */
      width: auto;
      padding: 5px;
      margin-left: 25px;
      margin-right: 25px;
      margin-top: 0.73%;
      display: flex;
      flex-flow: row wrap;
      align-self: flex-start;
      justify-content: center;
  
  }
  
  .footer-icons-box {
  
      /* border: 1px solid red; */
      width: auto;
      padding: auto;
      margin-left: 25px;
      margin-right: 25px;
      display: flex;
      flex-flow: row wrap;
      align-self: flex-end;
  
  }
  
  .sm-icon {
  
      display: inline-block;
      text-align: right;
  
  }
  
  .fa-circle {
  
      color: rgba(255, 255, 255, 0.9);
      transition: all 0.4s;
  
  }
  
  .footer-icons-box .fa-envelope, 
  .fa-twitter, .fa-free-code-camp, .fa-linkedin {
  
      color: #1b1d1e;
      transform: scale(1, 1);
      transition: all 0.4s;
  
  }
  
  .footer-icons-box .fa-envelope:hover,
  .fa-twitter:hover, .fa-free-code-camp:hover,
  .fa-linkedin:hover  {
  
      color: #337ab7 !important;
      transform: scale(0.8, 0.8);
      transition: all 0.4s;
  
  }
  </code></pre>
  
  <h1>JS (from the "my.js" file I referenced in the HTML section above)</h1>
  
  <pre><code>/* Begin 'scrollTo' */
  
  $(document).ready(function() {
      $('#topNav a').click(function() {
          $.scrollTo(this.hash, 1200, {offset: -70}, {easing:'swing'});
          return false;
      });
  });
  
  /* End 'scrollTo' */
  </code></pre>