i have here the code..
<div> <input type="hidden" value="hello" /> </div> <div> <input type="hidden" value="world" /> </div>
is it possible to select the div with the value "hello" inside and change the selected div's color to red...?
$("div input[value='hello']").css("background","red"); //i have this in mind //but i think its wrong:D
any help please..
You want to select the input, then take its parent div:
div
$("input[value='hello']").parent("div").css("background", "red");
1.4m articles
1.4m replys
5 comments
56.9k users