就像QQ聊天框那样特效,隐藏和显示的方法我做了,就是换图的不可以
那个Image的ImageUrl还要不要设置
<asp:Image ID="Image3" runat="server" ImageUrl="~/images/hidebuttom-left.gif" />Jquery  power是DIV
 $(document).ready(function () {
            $("#Image3").toggle(function () {                $("#power").hide("slow");            }, function () {
                $("#power").show("slow");
            });        });  
这还要怎么写

解决方案 »

  1.   

    当然要设置了
    <img id="Image3" src="~/images/hidebuttom-left.gif" />$(document).ready(function () {
      $("#Image3").toggle(function () {
          $("#power").hide("slow");
          $(this).attr("src","~/images/hidebuttom-right.gif");  }, function () {
          $("#power").show("slow");
          $(this).attr("src","~/images/hidebuttom-left.gif");
      });
    });   
      

  2.   


    attr 中的 src不能用~/ 换成<img id="Image3" src="/images/hidebuttom-left.gif" />$(document).ready(function () {
      $("#Image3").toggle(function () {
          $("#power").hide("slow");
          $(this).attr("src","~/images/hidebuttom-right.gif");  }, function () {
          $("#power").show("slow");
          $(this).attr("src","/images/hidebuttom-left.gif");
      });
    });   
      

  3.   

    换成
    <img id="Image3" src="/images/hidebuttom-left.gif" />$(document).ready(function () {
      $("#Image3").toggle(function () {
          $("#power").hide("slow");
          $(this).attr("src","/images/hidebuttom-right.gif");  }, function () {
          $("#power").show("slow");
          $(this).attr("src","/images/hidebuttom-left.gif");
      });
    });