I need to create an if statement in Js fetching when there's only 1 left (product) in stock. How would I go about this?
HTML on productpage:
<div id="product-spec">
 <div class="row">
  <ul class="col-xs-12">
   <li class="h4">
    <span class="availabilty"
     <span class="small">1 left</span>
    </span>
   </li>
  </ul>
 </div>
</div>
My Javascript so far:
if (.small == 1 left) { 
// execute this code 
}
W3 Schools - If Statements doesn't make me more sane.
 
     
    