I have a very confusing problem. I want to do some action within an HTML site, when a link is clicked. I implemented the following code with a click event, which should handle this behaviour:
$(document).ready(function() {
console.log("Ready!");
$( "a" ).click(function() {
console.log("Alert!");
alert("Test");
});
});
I implmented it in the head and at the end of the body but nothing happens. I don't get the console.log or alert. When I change the click to mouseover everything ist fine. Do you have any suggestions?
Regards, Jens
ais not added dynamically.