I have a little problem with a code like this
- $("#my_div").on("mouseenter","#inside_div",show_result);
- function show_result(event) {
- console.log(event.type);
- $.get("result.php").then(function(data) {
- console.log(event.type);
- $("#inside_div").text(data);});
- }
The problem is relative to event.type, with the first console.log i get event.type=mouseenter, but with the second console.log i get event.type=mouseover... why this?