title: .js file works in chrome and firefox but not IE
body: <p>When testing my website out in IE11 certain parts of it don't work and I believe the issue lies with my 'custom.js' file as all the problems link to that js.   However, the page works perfectly in Chrome and Firefox. </p>
  
  <p>I load the .js file called 'custom.js' in the footer of my page along with other page specfic plugins (jquery and bootstrap are loaded in the head) like so:</p>
  
  <pre><code>&lt;!-- JS Implementing Plugins --&gt;
  &lt;script type="text/javascript" src="/js/back-to-top.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="/js/smoothScroll.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="/js/jquery.parallax.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="/js/masterslider.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="/js/jquery.easing.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="/js/owl.carousel.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="/js/jquery.cubeportfolio.min.js"&gt;&lt;/script&gt;
  
  &lt;!-- JS Customization --&gt;
  &lt;script type="text/javascript" src="/js/custom.js"&gt;&lt;/script&gt;
  
  &lt;!-- JS Page Level --&gt;
  &lt;script type="text/javascript" src="/js/app.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="/js/owl-carousel.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="/js/master-slider-fw.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="/js/jquery.owl-filter.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="/js/material.min.js"&gt;&lt;/script&gt;
  
  &lt;script type="text/javascript"&gt;
      jQuery(document).ready(function() {
          App.init();
          App.initCounter();
          App.initParallaxBg();
          FancyBox.initFancybox();
          MSfullWidth.initMSfullWidth();
          OwlCarousel.initOwlEvent();
          OwlCarousel.initOwlSingle();
          OwlCarousel.initOwlTwo();
          OwlCarousel.initOwlAbout();
  
      });
      $(document).ready(function(){
          $('.owl-carousel').owlCarousel({
              nav:true,
              loop:true
          });
      });
  
  &lt;/script&gt;
  
  &lt;!--[if lt IE 9]&gt;
  &lt;script src="/plugins/respond.js"&gt;&lt;/script&gt;
  &lt;script src="/plugins/html5shiv.js"&gt;&lt;/script&gt;
  &lt;script src="/plugins/placeholder-IE-fixes.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>The contents of the custom.js file is:</p>
  
  <pre><code>$(".helpform-container:not(.displayblock)").hide();
      $(".helpform")
          .on('mouseover focus', function(e) {
              $(this).addClass("link-div-hover")
          })
          .on('mouseout blur', function(e) {
              $(this).removeClass("link-div-hover")
          })
          .on('touchstart', function(e) {
              $(this).addClass("link-div-hover")
          })
          .on('touchend', function(e) {
              $(this).removeClass("link-div-hover")
          })
          .on('click', function(e) {
              $(this).toggleClass("active");
              e.preventDefault();
  
              if ($(".helpform-container").is(":hidden")) {
                  $(".helpform-container").slideDown(400).addClass("displayed");
                  analyticsevent('How can we help form', 'open');
              } else {
                  $(".helpform-container").slideUp(400).removeClass("displayed");
                  $("#sticky-wrapper").css("height","auto");
                  analyticsevent('How can we help form', 'closed');
              }
  
              if (sitewidth &lt; 1024) {
                  $('html,body').animate({ scrollTop: $("#howcanwehelp").offset().top - 60 }, 250);
              } else {
                  $('html,body').delay(500).animate({ 
                      scrollTop: $("#howcanwehelp").offset().top 
                  }, 400);
              }
          })
  
      //FORM METRICS
      if ($('.formsent').length){
           analyticsevent('Contact form completed', 'consultation/quote/info/media');
      }
  
  //Homepage news articles
  
  var divs = $(".owl-news &gt; .news-v2");
  let array = [
    { length: 1, num: 4 },
    { length: 2, num: 3 },
    { length: 2, num: 3 },
    { length: 3, num: 2 }  
  ];
  
  let i = 0;
  
  
  for (let item of array) {
    divs.slice(i, i+item.length).wrapAll(`&lt;div id='news-${item.num}' class='col-md-${item.num}'&gt;&lt;/div&gt;`);
    i += item.length;
  }
  
  $("#news-4").before("&lt;div class='col-md-4'&gt;&lt;h3 id='title_featured'&gt;Featured News&lt;/h3&gt;&lt;/div&gt;&lt;div class='col-md-8'&gt;&lt;h3 id='title_latest'&gt;Latest News&lt;/h3&gt;&lt;/div&gt;");
  </code></pre>