title: removeClass() when in window?
body: <p><a href="http://imgur.com/9G8jXm2" rel="nofollow">http://imgur.com/9G8jXm2</a></p>
  
  <p>UPDATE:</p>
  
  <p>I removed the . from .hide-time, thanks! I also tried putting the block of code before, after, and in the document ready, like this:</p>
  
  <pre><code>$(document).ready(function() {
  
                  $('time').bind('inview', monitor);
                  function monitor(event, visible) {
                      if(visible) {
                          $('time').window(function() {
                              $(this).removeClass('hide-time');
                  });// element is now visible in the viewport
  
                  var updateMarker = function() {
  </code></pre>
  
  <p>and this: </p>
  
  <pre><code> $(window).on('scroll resize', updateMarker);
  
                  // Calls function on DOM ready
                  updateMarker();
  
  
                  $('time').bind('inview', monitor);
                  function monitor(event, visible) {
                      if(visible) {
                          $('time').window(function() {
                              $(this).removeClass('hide-time');
                  });// element is now visible in the viewport
              });
  </code></pre>
  
  <p>and this: </p>
  
  <pre><code>$('time').bind('inview', monitor);
                  function monitor(event, visible) {
                      if(visible) {
                          $('time').window(function() {
                              $(this).removeClass('hide-time');
                  });// element is now visible in the viewport
  
  
  
                  // Calls function when viewport is resized or scrolled    
                  $(window).on('scroll resize', updateMarker);
  
                  // Calls function on DOM ready
                  updateMarker();
              });
  </code></pre>
  
  <p>None of thesehavee worked. What am I doing wrong?</p>
  
  <p>I've been working on a timeline that has a date that animates with scroll. So far, I can't quite get the jQuery to .removeClass on the CSS .hide-time, which has the property display: none. </p>
  
  <p>The first set of instructions allow a path to move through the timeline. The last set of instructions handle the date element. I'm sure one problem I'm having is knowing where to put the second bit.. every time I put it before, after or in the timeline code, they both fail to work. Just to clarify, the timeline is working beautifully, I just need the date tag to display when it enters the viewport. The code is below:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
      &lt;head&gt;
          &lt;meta charset='UTF-8'&gt;
          &lt;!-- CSS Styles Link --&gt;
          &lt;link rel='stylesheet' type='text/css' href='styles.css'&gt;
          &lt;!-- jQuery Library Link --&gt;
          &lt;script type='text/javascript' src='jquery-awesomeness.js'&gt;&lt;/script&gt;
  
  
  
          &lt;script&gt;
              $(document).ready(function() {
  
                  var updateMarker = function() {
                      // Update measurements
                      var viewportHeight = $(window).height(),
                          contentHeight = $('#content1').height(),
                          pathWidth = $('#path').width(),
                          scrollPosition = $(window).scrollTop();
  
                      // Update #marker dimensions
                      $('.animate').width(scrollPosition/(contentHeight-viewportHeight)*pathWidth); 
                      // The breakdown: The line of code above defines scrollable distance by:
                      // Subtracting height of #content1 from height of viewport using (contentHeight-viewportHeight)
                      // This determines what percentage of the scroll has been scrolled through
                      // Multiply this percentage by #path width using *pathWidth
                  }
  
  
                  // Calls function when viewport is resized or scrolled    
                  $(window).on('scroll resize', updateMarker);
  
                  // Calls function on DOM ready
                  updateMarker();
              });
  
  
  
              $('time').bind('inview', monitor);
              function monitor(event, visible) {
  
                  if(visible) {
                      $('time').window(function() {
                          $(this).removeClass('.hide-time');
                  });// element is now visible in the viewport
              });
          &lt;/script&gt;
  
      &lt;/head&gt;
  
  
  
  
      &lt;body&gt;
          &lt;!-- HTML Code for Timeline elements --&gt;
          &lt;div id='timeline'&gt; &lt;!-- Timeline's main container --&gt;
              &lt;div id='path'&gt;
                  &lt;div id='marker' class='animate'&gt;&lt;/div&gt;&lt;!-- Timeline's animatable marker --&gt;
              &lt;/div&gt;&lt;!-- Timeline's inner path --&gt;
          &lt;/div&gt;
  
  
  
          &lt;div id='content1'&gt;
              &lt;div id='date-wrapper' class='animate'&gt;
                  &lt;time class='hide-time' datetime='1997-12'&gt;Dec '97&lt;/time&gt;
              &lt;/div&gt;
              &lt;p&gt;
                  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum dolor turpis, consectetur vel libero a, mollis dapibus odio. Nunc lobortis, eros non tincidunt porttitor, purus tellus porta lectus, non luctus arcu augue eu est. Nunc malesuada ex elit, vel bibendum erat dictum nec. Proin imperdiet efficitur elit eu vestibulum. Nullam id augue tincidunt, efficitur nunc non, efficitur urna. Proin sit amet tincidunt purus. Sed interdum, felis quis facilisis malesuada, felis felis viverra lectus, eget euismod elit risus et mi. Mauris eu enim tellus. Aenean tincidunt orci nec tincidunt facilisis. Phasellus dignissim ante ut maximus feugiat. Mauris sollicitudin venenatis neque nec luctus. Quisque vel tempus urna, sed feugiat leo. Sed tellus magna, molestie non purus in, viverra condimentum orci. Nulla a nunc mauris. Aliquam convallis interdum velit, aa
              &lt;/p&gt;
  
              &lt;time  class='hide-time' datetime='1998-12'&gt;Dec '98&lt;/time&gt;
              &lt;p&gt;
                  Sed volutpat purus enim, eget accumsan odio ullamcorper sit amet. Sed vitae imperdiet metus. Aenean mollis mauris odio, eget finibus ligula ornare eu. Aliquam id velit quis tellus cursus imperdiet. Mauris eget laoreet ipsum, sed ultricies magna. Aliquam vel neque ut risus dapibus suscipit nec nec ipsum. Nullam vulputate, elit sit amet finibus sagittis, nunc nisl molestie sem, et tincidunt neque magna in nunc. Nullam aliquam mi et ante dapibus posuere. Vivamus aliquet ipsum sit amet tellus lacinia, vitae convallis odio aliquam. Mauris rhoncus, leo sit amet vulputate placerat, sem tortor fermentum ex, quis luctus nulla sapien consequat nunc.
              &lt;/p&gt;
  
              &lt;time  class='hide-time' datetime='1999-12'&gt;Dec '99&lt;/time&gt;
              &lt;p&gt;
                  Phasellus a pellentesque urna. Integer eget mattis nulla. Nullam sed diam ipsum. Fusce interdum scelerisque arcu, quis ultricies risus accumsan vel. Quisque luctus nisi a nisl porttitor, at finibus elit porttitor. Fusce eget mauris a magna sollicitudin volutpat. Sed nisl magna, volutpat quis mauris a, sagittis mollis nibh. Ut consectetur justo et sem convallis, at elementum purus hendrerit. Curabitur eros odio, ullamcorper vitae facilisis vel, congue sed mauris. Aliquam egestas augue nec scelerisque ornare. Integer et neque metus. Suspendisse aliquet scelerisque odio et ornare. Donec ac mi sed nunc interdum aliquet nec at lectus. Praesent eu tortor pretium, euismod tellus ut, scelerisque massa. Nullam eleifend malesuada magna rutrum gravida.
              &lt;/p&gt;
  
              &lt;time  class='hide-time' datetime='2000-12'&gt;Dec '00&lt;/time&gt;
              &lt;p&gt;
                  Phasellus ultricies elit ac turpis consequat, a suscipit tellus cursus. Aenean in consectetur turpis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non dui non ipsum pretium sagittis. Donec dictum, enim sit amet venenatis venenatis, ante purus malesuada neque, ac pellentesque eros turpis eu velit. Vestibulum ligula leo, aliquet et dignissim et, dapibus nec orci. Nullam ultrices sapien id imperdiet aliquam. Vestibulum id lorem finibus, condimentum magna mollis, interdum magna. Sed vel lorem feugiat, aliquam mauris non, consequat ante. Nunc eu sem et dui porta auctor. Nam tincidunt orci sed egestas tempor. Suspendisse euismod, arcu vitae porta sollicitudin, justo erat porta sem, vel suscipit odio lorem sit amet mi. Maecenas quis finibus elit.
              &lt;/p&gt;
  
              &lt;time  class='hide-time' datetime='2001-12'&gt;Dec '01&lt;/time&gt;
              &lt;p&gt;
                  Praesent eu ante eu est rutrum suscipit. Maecenas dictum massa eros, blandit fermentum dui ultrices et. Duis in orci eget nulla tincidunt rhoncus at et purus. Nunc porta ipsum vitae lacinia ornare. Vivamus laoreet odio quis urna porta blandit. In viverra molestie ornare. Nam lorem turpis, lacinia at lacus non, pharetra efficitur ipsum. Donec ultrices lacinia velit id eleifend. Integer pellentesque lectus tincidunt est porta, et elementum ex euismod. Vivamus lobortis at odio at interdum. Vestibulum posuere quam dolor, at rhoncus elit cursus nec. Proin mollis tincidunt libero quis convallis. Donec vel placerat dui, at cursus urna. Donec cursus eleifend dapibus.
              &lt;/p&gt;
          &lt;/div&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>And the CSS:</p>
  
  <pre><code>#timeline {
      width: 98%;
      height: 1%;
      margin: 1%;
      padding-top: 1%;
      padding-bottom: 1%;
      position: fixed;
      bottom: 0;
      left: 0;
      background-color: #590C13;
      border-radius: 5px;
      }
  
  #path {
      width: 100%;
      position: absolute;
      border-top: 3px solid #424343;
      }
  #marker {
      width: 0;
      position: absolute;
      border-top: 3px solid #ffffff;
      }
  
  #date-wrapper {
      width: 5%;
      min-width: 5%;
      position: fixed;
      bottom: 7%;
      left: 0;
      }
  
  time {
      width: 50px;
      padding: 10px;
      position: absolute;
      bottom: 6.5%;
      right: 0;
      color: #ffffff;
      text-align: right;
      background-color: #424343;
      border-radius: 5px;
      }
  
  .hide-time {
      display: none;
      }
  
  p { /* This is place holder content used to test jQuery scroll position. Feel free to delete.  */
      padding: 3%;
      font-size: 2em;
      line-height: 3em;
      }
  </code></pre>
  
  <p>Thanks in advance for all the help!</p>