Reputation: 32247
If I plug in the following into my console (Chrome):
$('input[name=shopping-cart.merchant-private-data]');
it results in:
Error: Syntax error, unrecognized expression: [name=shopping-cart.merchant-private-data]
Upvotes: 0
Views: 379
Reputation: 32247
The real problem (and solution) actually dawned on me while posting.
The issue is the decimal place in the selector. You need to escape it with two backslashes like so:
$('input[name=shopping-cart\\.merchant-private-data]');
Upvotes: 4
Reputation: 2189
when creating selectors based on the value of an attribute, you should always surround the value in quotes:
$('input[name="shopping-cart.merchant-private-data"]');
Upvotes: 0