title: how might I disable a div when the data inside it reaches 0 possibly using an if else?
body: <p>I have a snippet of javascript that displays the amount of sessions available for an event </p>
  
  <pre><code>for ( var j in data.events[i].sessions ) {
                      first_session_id = !first_session_id ? data.events[i].sessions[j].id : first_session_id;
                      session_html += 
                          '&lt;li id="session_row_'+ data.events[i].sessions[j].id +'"&gt;'+ data.events[i].sessions[j].time+
                          '&lt;div class="right"&gt;'+ data.events[i].sessions[j].available +' sessions remaining&lt;/div&gt;&lt;/li&gt;';
                  }
  </code></pre>
  
  <p>at the moment when the sessions become empty or are all booked the value -1 is displayed. What I would like to do is add an if else statement that basically disables or blacks out the .right when we get to 0?</p>
  
  <p>Can anyone advise me on how this might be done?</p>
  
  <p>Regards
  Kyle</p>