When searching for this I found dozens of implementations doing things like parsing each character, string manipulation, and more. But one of the best solutions i could come up is this:

function isInteger(val)
{   

    return (val == null || isNaN(val)) ? false :    
        ( ((1.0 * val) == Math.floor(val)) && 
            (val.indexOf(".") == -1));   
}