I have a problem that i want to bind my setTimeout
$(document).click(function () {
function aktivereSkift() {
$(this).attr("src", "/lib/pictures/picA.png");
setTimeout("$('.myImg').attr('src', '/lib/pictures/picB.png')", 3000);
}
$(".myImg").on("click", aktivereSkift);
});
The problem is that i can only get i to work with this, which is not working properly it changes all the images to picB.png... is there a way that i cant do some "binding" like i do with the first $(this).attr changer??
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…