jQuery code difference
<p>Let me start by saying that I'm not a JavaScript programer or a jQuery guru by any means, I'm actually just starting with jQuery.</p>

<p>I have the two following jQuery codes:</p>

<pre><code>$('.tipTrigger').hover(function(){
    $(this).toggleClass('active').prev('.tipText').stop(true, true).fadeToggle('fast'); 
});
</code></pre>

<p>and</p>

<pre><code>if ($(".tooltip-container").length &gt; 0){        
    $('.tipTrigger').hover(function(){
        $(this).toggleClass('active').prev('.tipText').stop(true, true).fadeToggle('fast'); 
    });
}
</code></pre>

<p>Several questions I have about this:</p>

<ol>
<li>What is basically the difference between the two codes above?</li>
<li>What is the meaning of <code>if ($(".tooltip-container").length &gt; 0){</code>?</li>
<li>Is there a benefit to using the above <code>if</code>?</li>
<li>What's more 'efficient' from a developer's stand point? (that is IF something so small would have a considerable performance impact in any way)</li>
</ol>

<p>Any other comments/help with this simple comparison would be greatly appreciated.</p>

<p>Thanks in advance.</p>
