-1

How do I target a class based on its name:

<input type="submit" name="addtocart" class="addtocart-button" value="Add to Cart" title="Add to Cart">
$("[name="addtocart]").removeClass('addtocart-button');

This is what I thought how to do it, but doesnt work.

Mohammad
  • 21,175
  • 15
  • 55
  • 84
user2513528
  • 171
  • 1
  • 2
  • 12

1 Answers1

1

You can use this

$("input[name=addtocart]").removeClass('addtocart-button');

It should work.

Vikash
  • 3,391
  • 2
  • 23
  • 39