Follow twitter
kaatre2
-
cubeur78 Messages postés 102 Statut Membre -
cubeur78 Messages postés 102 Statut Membre -
Bonjour,
Je suis en train de créer un site web et je voudrais faire un bouton follox du style twitter.
Voici mes codes :
$("#button").click(function(){
if($(this).attr('data-following') == 'false'){
$(this).attr('data-following', 'true');
$(this).
text
('Unfollow');
}else if($(this).attr('data-following') == 'true'){
$(this).attr('data-following', 'false');
$(this).text('Follow');
}
});
et :
<button id="button" data-following="false">Follow</button>
Je suis en train de créer un site web et je voudrais faire un bouton follox du style twitter.
Voici mes codes :
$("#button").click(function(){
if($(this).attr('data-following') == 'false'){
$(this).attr('data-following', 'true');
$(this).
text
('Unfollow');
}else if($(this).attr('data-following') == 'true'){
$(this).attr('data-following', 'false');
$(this).text('Follow');
}
});
et :
<button id="button" data-following="false">Follow</button>