user2513528 user2513528 - 1 year ago 88
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.

Answer Source

You can use this


It should work.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download