title: Making Buttons Appear and Disappear
body: <p><a href="http://www.jsfiddle.net/Akmedrah/1cf6obpu/" rel="nofollow">http://www.jsfiddle.net/Akmedrah/1cf6obpu/</a></p>
  
  <p>Here is a fiddle of a picture button 'scroller' that I have. It is crappy but what I am really trying to figure out is the easiest way to make the arrow buttons that move the pictures right or left fade in and out when at the end of the order of pictures.</p>
  
  <p>I was thinking of a java script function that essential knew the total number, something like this (I have no idea what i'm doing when it comes to JS but here is the best of what I guess it would look like):</p>
  
  <pre><code>function fadeinout(){
    var total = 2; //because two in fiddle example, but theoretical could have hundreds
    var current = //somehow get the current image based off id or class or some other identifier, or file name.
    if (current &lt; 2) { //set up so i can expand??? maybe?
      document.getElementById("left-arrow").style.display = "true";
      document.getElementById("right-arrow").style.display = "true";
      }
    if (current == 1) {
      document.getElementById("left-arrow").style.display = "false";
      }
    if (current == 2) {
      document.getElementById("right-arrow").style.display = "false";
      }
    }
  </code></pre>
  
  <p>I just want to know if I am headed in the right direction or if I am making this way to complicated. Thanks!</p>