JS parseInt() issue
<p>I know I might be doing something wrong. Can anyone please point out why I'm getting top as object??</p>

<pre><code>$(document).ready(function(){
    topwithpx='0px';
    alert(topwithpx);
    topstr=topwithpx.substr(0,topwithpx.length-2);
    alert(topstr);
    top=parseInt(topstr);
    alert(top);
});​
</code></pre>

<p><a href="http://jsfiddle.net/kjMs9/" rel="nofollow">http://jsfiddle.net/kjMs9/</a></p>

<p>Thanks all: 'top' is reserved keyword (Window.top). My bad. Accepting first ans. +1 to all for quick ans.</p>
