javascript snippet works on console, but not on page
<p>I'd like to use <a href="http://momentjs.com/" rel="nofollow">moment.js</a> and have included the moment.js in the head portion of the html. I am using <a href="http://foundation.zurb.com/" rel="nofollow">foundation</a> framework and loading the js like so:</p>

<pre><code>&lt;script src="/static/js/moment.js"&gt;&lt;/script&gt;
&lt;script src="/theme/javascripts/vendor/custom.modernizr.js"&gt;&lt;/script&gt;
&lt;script src="/theme/javascripts/foundation.min.js"&gt;&lt;/script&gt; 
</code></pre>

<p>In my page that is being served, I call this:</p>

<pre><code>&lt;script&gt;moment("20130420", "YYYYMMDD").fromNow();&lt;/script&gt;
</code></pre>

<p>Nothing shows up. It is blank.</p>

<p>However, when I go to the console and type <code>moment("20130420", "YYYYMMDD").fromNow();</code>, I get <code>in a month</code> in the console which is correct.</p>

<p>What can be going on such that the date does not show up on the page, but works on the console? </p>
