xxxxxxxxxx
var listItems = $("#productList li");
listItems.each(function(idx, li) {
var product = $(li);
// and the rest of your code
});
xxxxxxxxxx
//looping through list elements in jquery
$('#myUlID li').each(function() {
console.log($(this));
})