I've following HTML
,
<input type=text id='input_field_1` class='row'/>
<input type=text id='input_field_2` class='row'/>
<input type=text id='optional_field_3` class='row'/>
In above DOM
if I want to select the elements who's id
starts with input_field_
then I'm able to achieve this by $("input[id^='input_field_']")
Now some more input
elements are added to existing DOM
structure,those are
<input type=text id='input_field_min_4` class='row'/>
<input type=text id='input_field_max_5` class='row'/>
<input type=text id='optional_field_6` class='row'/>
If I use $("input[id^='input_field_']")
then all the elements starting with input_field_
, including input_field_min_4
and input_field_max_5
are also selecting.
I don't want this, I want to exclude input_field_min_4
and input_field_max_5
,for that if do some like $("input[id^='input_field_'],input:not[id^='input_field_m']")
then result is not getting what I expect.