can you help me. I need select with JQuery input with name and input with name in array.
<input type="text" name="name">
<input type="text" name="shippingAddress[name]">
I try this, but this not work.
var name = $('[name^="name"]');
You could use the attribute-contains selector:
var name = $('[name*="name"]');
That will select any element where its name attributes value contains the substring "name", so will match both <input type="text" name="name"/> and <input type="text" name="shippingAddress[name]"/>.
shippingAddress[name]supposed to be the value of thenameattribute or its own attribute?shippingAddress[name]what is this?