我需要一个像这个例子这样的按钮
我应该用java脚本写什么?
$('.following').hover(function(){
$(this).text("Unfollow");
},function(){
$(this).text("Following");
});
//for toggle the class following/follow When click
$('.following').click(function(){
$(this).toggleClass('following follow').unbind("hover");
if($(this).is('.follow')){
$(this).text("Follow");
}
else{
//binding mouse hover functionality
$(this).bind({
mouseleave:function(){$(this).text("Following");},
mouseenter:function(){$(this).text("Unfollow");}
});
}
});
有什么变化需要有引导按钮?