日期:2014-05-17  浏览次数:20484 次

jquery 中怎么如何让显示和隐藏时的图片改变
就像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");


  });

  });  
这还要怎么写

------解决方案--------------------
当然要设置了
C# code


<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");
  });
});

------解决方案--------------------
换成


<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");
});
});