how do i Find and then have a callback function
<p>I am not sure if my code is correct but I am trying to run some checks on a specific element but my counters are not working - my fields are not hiding.</p>

<pre><code>//get all fields, some could be text, text area, checkbox, radio...

$(".my-field").each(function(i) {
var wrapper = this;

//check if the text box has a vaule, this callback here is not working/ correct?

$(wrapper).find("input:text", function() {
                if ($(this).val() != "" || $(this).val().length &gt; 0) {
                    hidden++;
                    $(wrapper).find(".field-content").hide();
                    $(wrapper).addClass("hide");
                } else {
                    visible = visible + 1;
                }
            });
});
</code></pre>

<p>My Html below is 1 <em>field</em> (one div shown below) they are all wrapped inside a div with other fields</p>

<pre><code>&lt;div data-field-type="Text" data-field-id="1" class="display-wrapper my-field"&gt;
        &lt;div class="field-header"&gt;
            &lt;span&gt;name:
                xyz&lt;/span&gt; | &lt;span&gt;
                    text field&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class="field-content"&gt;
            &lt;div class="editor-label"&gt;
                &lt;p class="clear"&gt;
                    some description...&lt;/p&gt;
            &lt;/div&gt;

&lt;div class="editor-field"&gt;
    &lt;input type="text" value="iojhiojio" name="1" maxlength="100" id="field-1" class="field-bigtext"&gt;
&lt;/div&gt;
            &lt;br&gt;
        &lt;/div&gt;
        &lt;div style="display: none;" class="field-error-wrapper"&gt;

        &lt;/div&gt;
    &lt;/div&gt;
</code></pre>

<p>My Question, is this possible with jquery:     </p>

<pre><code>$(wrapper).find("input:text", function() {
.. some code
});
</code></pre>
