I have the below html. Could you tell me how do I use jquery to loop through each query_chunk divs and bind different events to each element inside the div?
I know I can use the .each function, but am stuck on the syntax. Any ideas appreciated.
<div id="query_chunk_1">
<select class="parameter" id="parameter_1" name="parameter_1">
<option title="Keyword Anywhere" value="Anywhere">Keyword Anywhere</option>
<option title="Author or Contributor" value="Contributor">Author or Contributor</option>
<option title="Title" value="Title">Title</option>
<option title="Subject" value="Subject">Subject</option>
</select>
<input id="keyword_1" name="keyword_1" type="text" />
<a href="#" id="remove_1" title="Remove">[-]
</a>
</div>
<div id="query_chunk_2">
<select class="parameter" id="parameter_2" name="parameter_2">
<option title="Keyword Anywhere" value="Anywhere">Keyword Anywhere</option>
<option title="Author or Contributor" value="Contributor">Author or Contributor</option>
<option title="Title" value="Title">Title</option>
<option title="Subject" value="Subject">Subject</option>
</select>
<input id="keyword_2" name="keyword_2" type="text" />
<a href="#" id="remove_2" title="Remove">[-]
</a>
</div>