Does anyone know how to the change the background of a DIV when the a <input>
is clicked?
views:
33answers:
2
+2
A:
using jquery:
$('#input_id').click(function() {
$('#div_id').css('background-image','url')
});
Sergey
2010-08-28 21:03:41
A:
Something like this:
var input = document.getElementById("my_input_id");
input.onclick = function ()
{
document.getElementById("my_div").style.backgroundColor = "blue";
};
svanryckeghem
2010-08-28 21:04:17