Hasclass usage in each()
<p>Here is my script i want to add class if the div with class <code>.field-collection-container</code>, but i want to apply this to div which class don't include <code>.field-name-field-basic-info</code>, pls read the html, </p>

<pre><code>$('.field-collection-container').each(function (index, obj) {
    if (($(this).hasClass('field-name-field-basic-info')) == false) {
        $(this).find('.field-items .content .field-item').each(function (index, obj) {
            //alert($(this).text());
            if ($(this).text() == '1') {
                $(this).addClass("tick1");
            } else {
                $(this).addClass("tick0");
            }
        });
    }
});
</code></pre>

<p>the html:</p>

<pre><code>&lt;div class="field-collection-container field-name-field-basic-info"&gt;not apply&lt;/div&gt; 
&lt;div class="field-collection-container"&gt;apply&lt;/div&gt;
</code></pre>

<p>i use hasClass try to do this but not successful.</p>
