I previously opened a similar thread, but with the condition that the div does not contain a second element within it. So my previous question was as follows:
I have some code that looks like this:
<p class="elementWrap">
<label>Phone</label>
<input class="form_elem" type="text" name="form_phone">
<span class="form_required">*</span>
</p>
and sometimes like this:
<p class="elementWrap">
<label>Name</label>
<input class="form_elem" type="text" name="form_name">
</p>
rgraham provided this solution which works well:
$(".elementWrap").filter(function() {
return $(this).children(".form_required").length;
}).find("label").css({'width':'auto','margin':'0px'});
Now, I want to modify this code to exclude labels with inputs of type Radio. I'm thinking about something like returning the length of children with the class .form_required and not input type radio. However, I'm unsure of how to write this in code. =/