I have the following code:
$('input.update-grid', $form)
.each(function () {
var id = this.id.replace('modal', '');
$('#input' + id).val(this.value)
})
I would like this to also select for textareas that have a class of upgrade-grid. Is there a way that I can do this without making another selector and code?
Also if I want to set the text in a textarea is that just set in the same way as an input with .val()?
Or if no other element tags have that class: