Can't select a child node within the Javascript code
<p>I have this HTML piece of code</p>

<pre><code>&lt;div id="countdown"&gt;
                    &lt;ul&gt;
                        &lt;li id="giorni"&gt;&lt;span class="num red"&gt;66&lt;/span&gt;&lt;span class="lab"&gt;Giorni&lt;/span&gt;&lt;/li&gt;
                        &lt;li id="ore"&gt;&lt;span class="num red"&gt;23&lt;/span&gt;&lt;span class="lab"&gt;Ore&lt;/span&gt;&lt;/li&gt;
                        &lt;li id="minuti"&gt;&lt;span class="num red"&gt;44&lt;/span&gt;&lt;span class="lab"&gt;Minuti&lt;/span&gt;&lt;/li&gt;
                        &lt;li id="secondi"&gt;&lt;span class="num red"&gt;14&lt;/span&gt;&lt;span class="lab"&gt;Secondi&lt;/span&gt;&lt;/li&gt;
                    &lt;/ul&gt;
            &lt;/div&gt;
</code></pre>

<p>I want to replace the content of each span that has a num class. In order to do that I have written: </p>

<pre><code>var countdown = {
        init: function( config ) {
            this.dataX = Date.parse(new Date(2012, 5, 30));
            this.adesso = new Date().getTime();
            this.giorni = config.container.find('li#giorni');
            console.log(this.giorni);
            this.count();
        },
                ... some other code ...
};

countdown.init({
   container: $('div#countdown ul');
});
</code></pre>

<p>I really don't understand why if I try to log <code>this.giorni</code> I get <code>[]</code> in response, but if I write into the console the same code it returns the node I need. </p>
