Change item value by index

I can not find a solution for the following problem: There is an element that should change when another element was changed, when it received the same index:

 $("input[bez='sbd_texte']").eq(index).val() = "test";

The variable "index" is fine, but I cannot figure out how to change the value of this specfic element.

So, how can I change the value of the specfic element that is recognized by the index?

+3
source share
1 answer
$("input[bez='sbd_texte']").eq(index).val("test");

jQuery has a wonderful document site, look at the valdocs:

.val( value ) Returns: jQuery

Description: Set the value of each element in the set of matched elements.

docs

+7
source

All Articles