title: .attr not working in jquery varible
body: <p>in my developer tools an error appears saying: 
  <br>script.js:5 Uncaught TypeError: Cannot read property 'attr' of undefined at script.js:5</p>
  
  <pre><code>var $cell = $('td');
  var psib = $cell.previousSibling;
  var nsib = $cell.nextSibling;
  $cell.addClass('o');
  var $nsibclass = nsib.attr('class') //script.js:5
  </code></pre>