Tried the following, but did not seem to work: if ($("input[name*='delete_linkid']",this)) { alert('it does!'); }
On Apr 13, 5:27 pm, Nic Hubbard <nnhubb...@gmail.com> wrote: > I have input values that I am adding to a array. I would like to be > able to check if any of them end in _test and if so, I need to set a > specific value. Is there any, in an if statement, to check if an > attribute of one of the input fields ends with _test? > > main_form.find('input').each(function() { > arr_current_item2.push($(this).attr('name') + '=' + $(this).val()); > > });// End each