帮我用这个小提琴
正如您在标题中看到的那样,我在一个元素上有两个功能,我想禁用一个,而另一个正在运行。
function SetupClick() {
$("#Wp").toggle(function(){
$("#Wp").animate({"width":"500"},"slow");
},function(){
$("#Wp").animate({"width":"100"},"slow");
});
}
function SetupMouseover() {
$("#Wp").mouseenter(function(){
$("#Wp").animate({"width":"500"},"slow");
});
$("#Wp").mouseout(function(){
$("#Wp").animate({"width":"100"},"slow");
});
}
$('#Ck').click(function() {
SetupClick();
// Optionally, save choice
localStorage['userchoice'] = 'click';
});
$('#Me').click(function() {
SetupMouseover();
// Optionally, save choice
localStorage['userchoice'] = 'mouseover';
});