亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

jQuery ??? ??? ??

1. hover(over, out)

hover ??? ?? ?? ??????? mouseover ? mouseout ?? ??? ?????. ?? ?? ???.

image_thumb_6.png

? ?? div(??? ??)? ????. ???? div(??? ??)? ???? ????. HTML ??? ??? ????.

  <div class="outer" id="outer1">
     Outer 1      <div class="inner" id="inner1">Inner 1</div>
   </div>
   <div class="outer" id="outer2">
     Outer 2      <div class="inner" id="inner2">Inner 2</div>
   </div>
   <div id="console">
</div>

?? ???? ??????.

<script type="text/javascript">
     function report(event) {
       $('#console').append('<div>'+event.type+'</div>');
     }
     $(function(){
       $('#outer1')
        .bind('mouseover',report)
        .bind('mouseout',report);
       $('#outer2').hover(report,report);
     });    
</script>


Outer1 Outer1? ??? ???? ???? ??? ? ??? ?? ? ????? ???? ??????. ??? ???? ???? ?? Outer1 ??? ????? mouseout ???? ????? ?? ? ? ????.

image_thumb_7.png

? ??? ??? ??? ?? ??? ??? ???? ???? ??? ????. Outer1 ???? ???? ??? ?? ??????. Outer2? Hover() ??? ???? ?? ??? ????.

image_thumb_8.png

??? ??? ??? ??? ? "mouseenter"?? ?? ? "mouseleave"???. "mouseover" ? "mouseleave" ???.

??? ??? ????? ?? ??? ?? ? ?? ??? ??? ?? ??? ????. mouseout ???? ?? ??? ???? ???? ???? ??? ???? ??? ? ?? ?? ??? ???? ??? ?? ?? mouseout ???? ???? ??? ????. hover() ??? ? ??? ?? ?? ??????.

2. ,... )

?? ??? ?? ??? ??? ??? ??? ??? ? ??? ?? ??? ??? ??? ????? ?????.

???? ??? ???? ??? ? ?? ??? ?????, ??? ??? ?? ???? ??? ? ?? ??? ?????, ? ?? ??? ??? ??? ???? ?? ??????. ?? ??? ??? ??? ??? ?? ??? ??? ?????.

unbind("??")? ???? ??? ? ????.

?? ???? ?? ??? ???? ??? ?????.

 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><head>
   <title>toggle example</title>
   <link rel="stylesheet" type="text/css" href="css/hover.css">
   <script src="http://code.jquery.com/jquery-3.1.1.min.js"></script>
   <script type="text/javascript">
       $(function()
       {
           $("li").toggle(              function()
             {
                 $(this).css({ "list-style-type": "disc", "color": "blue" });
             },              function()
             {
                 $(this).css({ "list-style-type": "square", "color": "red" });
             },              function()
             {
                 $(this).css({ "list-style-type": "none", "color": "" });
             }
           );
       })    </script></head><body>
   <ul>
       <li style="cursor:pointer">click me</li>
   </ul>
</body>
</html>


????? "click me"? ??? ??? ?? ??? ??? ??? ?????.


???? ??
||
<html> <head> <script src="http://code.jquery.com/jquery-3.1.1.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $(".btn1").click(function(){ $("p").toggle(); }); }); </script> </head> <body> <p>This is a paragraph.</p> <button class="btn1">Toggle</button> </body> </html>