日期:2014-05-16 浏览次数:20370 次
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<BODY>
<input id="login" type="button" value="login" />
<input id="rebind" type="button" value="rebind" />
<script src="jquery-1.7.2.js"></script>
<script language="javascript">
$(function(){
function funA(){
alert(1);
}
function funB(){
alert(2);
}
var $login = $("#login");
$login.toggle(funA,funB);
$("#rebind").click(function(){
$._data( $login[0], "lastToggle" + funA.guid, 0 );//hack
$login.unbind();
$login.toggle(funA,funB);
});
});
</script>
</BODY>
</HTML>