I am selecting all input elements with class "img-title" in order to get an array with the current value of these inputs:
var values = []
for (let element of $(".img-title")){
values.push( element.val() ) }
But this doesn't work, because the elements of $(".img-title") are not the references to the inputs as I expected, but the html code, so val() rises an error. Is there a simple way to get the array with the current values of the inputs with class "img-title" ?