Cant work out correct jquery selector
Hi, I've been going through the jquery documentation trying to find something to do this, but not managed to get anything working yet.
I have the following html
-
<div class="container">
<div>
<label for="test1">
<select id="test1" name="test1" class="mytest">
<option>one</option>
<option>two</option>
</select>
<div>
<div>
<input type="text" id="test1b" name="test1b" class="mytest_text" />
</div>
<div>
<label for="test2">
<select id="test2" name="test2" class="mytest">
<option>one</option>
<option>two</option>
</select>
<div>
<div>
<input type="text" id="test2b" name="test2b" class="mytest_text" />
</div>
</div>
I have the following jquery to attach the change event of the dropdowns
-
$(".mytest").change(function(){
// Enable/disable next element with class "mytest_text" after $(this)
});
I cant work out how to target the next element that has a class of "mytest_text" after the one that triggered the change event...
Any suggestions?
Thanks,
Josh