I'm developing a kind of online store in which adding items to carts are carried out by an Ajax method. I'm using ASP.NET MVC and in my Razor view engine I Require to have many submit buttons with the same ID (for some reasons) but with different names to distinguish them problematically. These buttons are used to fire the Ajax method at different areas in the same page. When they are clicked, they set some value to a hidden submit button (the ones that share the same ID) and then fire them. I need to fire these button based on their names, for example
//Instrad of
$("#ID").trigger("Click")
//I trigger click them by their `name` attribute.
I know how to get the values or other attributes of an element by name, but so far I have no clue on how to trigger a button by name. So I wanna know if that's possible at all and how it can be done.