首页javascripttriggerjQuery Event - 如何处理鼠标事件一次...

jQuery Event - 如何处理鼠标事件一次...

我们想知道如何处理鼠标事件一次。...

<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
  src='http://code.jquery.com/jquery-1.6.1.js'></script>
<script type='text/javascript'>
$(window).load(function(){
    $(function() {
        $('.load-popup-public').click(function() {
            console.log($(this).text() + " was clicked.")
        });
        $(".load-popup-public:first").trigger("click");
    });
});
</script>
</head>
<body>
  <ul>
    <li><a href="#" class="load-popup-public 500x400">1</a></li>
    <li><a href="#" class="load-popup-public 500x400">2</a></li>
    <li><a href="#" class="load-popup-public 500x400">3</a></li>
    <li><a href="#" class="load-popup-public 500x400">4</a></li>
  </ul>
</body>
</html>