How do I edit an input inside a div?

I’ve got a div (with an dynamically generated id) and inside that I’ve got a series of divs with input fields inside them. I want to be able to enable all of the inputs with one click of a button but I can’t this this to work.

The code I’ve got is:
$("#container_"+$IDold+":input").removeAttr('disabled');
but it doesn’t work at all. $IDold is correct and if I change it to
$(".input_"+$buttonID).removeAttr('disabled');
it works but only for inputs that are already there not for user added ones which won’t have a class straightaway.

Try testing your selectors in the console, I think you want the descendant selector with a space rather than a colon.

$("#container_"+$IDold+" input")

Thanks that works perfectly now :slight_smile:

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.