I still get a little confused when it comes to selectors and patterns... Basically, I'm trying to find the parent div of an input item and if a string is found anywhere in its ID, I want to set it to display none.
I've done this before by just doing something like:
if($('div[id*=string]')) { $(this).attr('display','none'); }
But, I'm not sure how to do that for a variable?
This is as far as I got, and then I get stuck...
$('input.rclass').each(function() {
var myDiv = $(this).parent().parent();
if($(myDiv...
});
The markup looks like this:
<div id="edit-gci" class="form-item">
<label for="editgci[0][foa][value]" class="option">
<input type="radio" class="rclass" value="" name="editgci[0][foa][value]" id="editgci-0-value-string-idnum"> N/A
</label>
</div>