How to get available scroll x amount
<p>I am looking to figure the amount available to scroll right. If a user has a smaller screen, the content that is appended will look cut off and I would like to just scroll for them in a smoother fashion. I have used </p>

<pre><code>scrollTo(99999, y); 
</code></pre>

<p>but that just jumps. I think my best bet would be something along the lines of:</p>

<pre><code>var inter = setInterval(function(){
  if(available_amount_x &gt; 0){
    scrollBy(10, 0);
  }else{
    clearInterval(inter);
  }
}, 100);
</code></pre>

<p>In short, how do I get available_amount_x</p>

<p>Thanks!</p>
