首页javascriptmousejQuery Event - 如何处理鼠标进入和鼠标离开事件...

jQuery Event - 如何处理鼠标进入和鼠标离开事件...

我们想知道如何处理鼠标进入和鼠标离开事件。...

<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
  src='http://code.jquery.com/jquery-1.10.1.js'></script>
<script type='text/javascript'>
$(window).load(function(){
    $(document).ready(function(){
        $('#sample').click(function() {
            console.log('yo yo yo .....you good to go.!!!'); 
        });
        $('#sample').trigger('click');
    });
});
</script>
</head>
<body>
  <a href="#" id="sample">this is a link</a>
</body>
</html>