Exclude sections of document from being selected...
I'm trying to figure how to exclude parts of the document from being selected.
Lets say I have this HTML
-
<div id='one'>
<input name="op" id="edit-1-1" value="Submit 1-1" class="form-submit" type="submit">
<input name="op" id="edit-1-2" value="Submit 1-2" class="form-submit" type="submit">
</div>
<div id='two'>
<input name="op" id="edit-2" value="Submit 2-1" class="form-submit" type="submit">
<input name="op" id="edit-2" value="Submit 2-2" class="form-submit" type="submit">
</div>
And I wish to add a function to all submit buttons but I want to exclude buttons that are under "div #one"
My thinking is to subtract two sets of elements, something like
(But that doesn't work
-
$('input:submit') - $('div #one input:submit')
I also tried with :not but it is probably not right
-
$('input:submit:not(div #one *)')
Please help..
Thanks