What is the jQuery equivalent to this getElementsByName?

What is the jQuery equivalent to this getElementsByName?

So what would be the jQuery equivalent to this standard getElementsByName set of code?

  1. for (var index=0; index<document.getElementsByName("amount1").length; index++)
  2. {
    total = total + document.getElementsByName("amount1")[index].value * document.getElementsByName("amount2")[index].value;
     }


  3. document.getElementById("totalAmount").innerHTML=total;