You want a multiple attribute selector
$("input[type="checkbox"][name="ProductCode"]").each(function(){ ...
or
$("input:checkbox[name="ProductCode"]").each(function(){ ...
It would be better to use a CSS class to identify those that you want to select however as a lot of the modern browsers implement the document.getElementsByClassName
method which will be used to select elements and be much faster than selecting by the name
attribute