I am trying to loop through an element with class name and find the input value inside it:
document.querySelectorAll('.qty').forEach(element=>{
console.log($(this).find('input').val())
})
This returns undefined
However, if I change the code above to:
document.querySelectorAll('.qty').forEach(element=>{
console.log($('.qty').find('input').val())
})
Isn't this
supposed to refrence the class name with quantity. Why does this
not work?