Using $(this > "img")
Using $(this > "img")
For a little game I want to blacken the border of an image within a particular div:
- myPictureID = "#" + $( this ).attr( "id" );
if (myPictureID == "#t0"){
$("img").css({"border-color":"#000000"})
}
Because there are more #t0 divs, I only want to make the border of the clicked div black.
$(this > "img").css({"border-color":"#000000"}) doesn't work.
How should I solve this?