Well, this is probably an extremely simple thing, but I'm trying to figure it out:
Assuming a code
<input type = "text" class = "campos" value = "texto1">
<input type = "text" class = "campos" value = "texto2">
<input type = "text" class = "campos" value = "texto3">
<input type = "text" class = "campos" value = "texto4">
Is there a way to get input with text3 via jquery? With pure javascript I would use
var texto = document.getElementsByClassname("campos")[2].value
but $(".campo")[2].val()
does not work.