Jquery check for integer?
<p>I have this code:</p>

<pre><code>    jQuery(function( $ ){

    // If no speed is set (when loading the page) set default speed

    if (!$moveSpeed) {
        var $moveSpeed = 4000;
    }

    // Move the damn autocue

 $('a.goDown').click(function(){
        alert($moveSpeed);
  $.scrollTo('#footer', $moveSpeed);
  return false;
 });

    $('a.goUp').click(function(){
        alert($moveSpeed);
  $.scrollTo('#header', $moveSpeed);
  return false;
 });


    // Speed settings for autocue

    $('a.changeSpeed').click(function(){
  $moveSpeed = $(this).attr('speed');
  return false;
 });
});

&lt;/script&gt;
</code></pre>

<p>and if the changeSpeed is clicked, the alert box shows it is changed to the given number but it aint an integer, is there a way to convert a variable in to an integer? </p>

<p>thx :)</p>
