$.map creates a new array based on the return value of the function,
using the format
newarray = $.map( array, function );
The array in the sample is the jQuery selector (which is array-like).
The function iterates through the members of the array, with the index
passed in as "i" and the member e
If I understand you code, you're trying to create an array of
name=value, with value being specifically set if the name has _test in
it?
var arr = $.map($('input'),function(n,i){
return n.name+'='+(n.name.indexOf('_test')!=-1?'some_value':n.value);
});
On Apr 13, 5:27 pm, Nic Hubbard wr
Could you explain this one a little more? How you coded it is a
little confusing to me.
On Apr 13, 6:34 pm, mkmanning wrote:
> If I understand you code, you're trying to create an array of
> name=value, with value being specifically set if the name has _test in
> it?
>
> var arr = $.map($('inpu
try remove the single quotes
if ($("input[name*=delete_linkid]",this)) {
alert('it does!');
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 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
5 matches
Mail list logo