<PLEASE USE THIS TEMPLATE TO HELP YOU CREATE A GREAT POST!>
<Below this line, add a link to the EXACT exercise that you are stuck at.>
<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>
hi all, im new in this forum and pardon with my bad english.
iam also new to jquery and right now i am learnig about mouseenter and mouse leave. the image doesn’t come out until i touch it with the cursor. it supposed to be already had an image before mouseenter and become bigger, then when mouseleave it become smaller…
the point is the image doesn’t work properly…
i want to ask if there is wrong with my code and what was it?
thank you very much all.
$("img").mouseleave(function() {
var namaDepan = $(this).attr("id");
$(this).attr("src", namaDepan + "_s.png");
});
});
</script>
<style type="text/css">
img {
vertical-align: top;
}
</style>
</head>
<body>
<img id="zombies2" src="zombies2_s.png">
<img id="cover1" src="cover1_s.png">
<img id="success2" src="success2_s.png">
<img id="human2" src="human2_s.png">
</body>
<do not remove the three backticks above>