Hi! i'm having problem while assigning variable to the id attribute of an input.
My task is to disable input with the id identical to the name attribute of the other input. Here is the code:
$("input[class='yes']").click(function() {
var x = $(this).attr("name");
$("input[id=x]").attr('disabled', true);
});
Help me, please, to figure out how to assign variable 'x' to the id attribute.