user2513528 user2513528 - 25 days ago 7x
jQuery Question

How to target a class based on the elements name

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">


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


You can use this


It should work.