jQuery .text() method returns empty string
<p>HTML code:</p>

<pre><code>&lt;div class="m-t-md"&gt;
    &lt;small class="pull-left"&gt;
        &lt;i class="fa fa-clock-o"&gt;&lt;/i&gt;
        &lt;span id="updatedTime_SalesTab"&gt;&lt;/span&gt;
    &lt;/small&gt;
&lt;/div&gt;
</code></pre>

<p>JS code:</p>

<pre><code>$(document).ready(function () {
    function updatedDate() {
        var testDateUtc = moment.utc();
        var local = moment(testDateUtc).local(); 

        var updatedTime = moment(local).format("MM/DD/YYYY h:mm A");
        console.log('updated: ', updatedTime); // log: "updated:  12/20/2016 11:44 AM"

        $('#updatedTime_SalesTab').text(updatedTime);
    }

    updatedDate();
});
</code></pre>

<p>But I have only clock icon, span is empty. What's wrong with my code?</p>