jQueryにおけるfadeinとfadeoutメソッドの使用例

1807 ワード

この例では、jQueryにおけるfadeinとfadeoutの方法の使い方について説明します.皆さんの参考にしてください.具体的には以下の通りです.




  
  <style type="text/css">
    *{font-size:12px;}
    div{width:600px;margin:auto;}
    #control{background-color:gold;padding:10px;margin-bottom:10px;}
  </style>
  <script src="../js/jquery-1.5.1.min.js" type="text/javascript"/>
  <script type="text/javascript">
    $(function () {
      $("#btnfadeIn").click(function () {
        $("#message").fadeIn(1000);
      });
      $("#btnfadeOut").click(function () {
        $("#message").fadeOut(1000);
      });
    });
  </script>


  <div id="control">
    <input id="btnfadeIn" type="button" value="  div"/>
    <input id="btnfadeOut" type="button" value="  div"/>
  </div>
  <div id="message">
    mouseover、mouseenter   :div  div。   。        。<br/> 
                     ,     mouseover    <br/>
                  ,     mouseenter   (         )
  </div>



</code></pre> 
 </div> 
 <p>    jQuery                 :《jQuery  DOM      》、《jQuery          》、《jQuery           》、《jQuery         》、《jQuery      》、《jQuery  (table)      》、《jQuery        》 《jquery       》</p> 
 <p>         jQuery        。</p> 
 <div class="clearfix"> 
  <span id="art_bot" class="jbTestPos"/> 
 </div> 
</div>
                            </div>
                        </div>