JSFiddle - React, Tailwind, and code Playground
HTML
<button type="submit" value="" class="btn follow following " title="In bookmarks">
<i class="bookmarked"></i><span>In bookmarks</span>
</button>
<button type="submit" value="" class="btn follow unfollow displaynone" title="From bookmarks">
<i class="unfollow"></i><span>From bookmarks</span>
</button>
CSS
button.btn.follow.following {
background-color: #00AE3E;
background-image: url(https://twimg0-a.akamaihd.net/a/1326412195/phoenix/img/bg-btn-follow.png);
background-position: 0 0;
background-repeat: repeat-x;
border-color: #393 #393 #277827;
color: white !important;
text-shadow: -1px -1px 0;
}
button.btn.follow.unfollow {
background-position: 0 -200px;
background-color: #C63738;
background-image: url(https://twimg0-a.akamaihd.net/a/1326412195/phoenix/img/bg-btn-follow.png);
background-position: 0 -68px;
background-repeat: repeat-x;
border-color: #A33 #A33 #962C2C;
color: white;
}
button.btn.follow.unfollow:hover, .profile-unfollow-link:hover, button.btn.follow.unfollow:focus {
background-position: 0 -200px;
background-color: #C63738;
background-image: url(https://twimg0-a.akamaihd.net/a/1326412195/phoenix/img/bg-btn-follow.png);
background-position: 0 -68px;
background-repeat: repeat-x;
border-color: #A33 #A33 #962C2C;
color: white;
}
button.btn {
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
background-attachment: scroll;
background-color: #ddd;
background-image: url(https://twimg0-a.akamaihd.net/a/1326412195/phoenix/img/buttons/bg-btn.gif);
background-position: 0 0;
background-repeat: repeat-x;
border: 1px solid #ddd;
border-bottom: 1px solid #ccc;
color: #333;
cursor: pointer;
font-family: "Lucida Grande", sans-serif;
font-size: 11px;
line-height: 14px;
padding: 4px 8px 5px 8px;
/*text-shadow: 1px 1px 0 #fff;*/
vertical-align: top;
}
button.btn:hover {
border: 1px solid #999;
border-bottom-color: #888;
color: #000;
background-color: #d5d5d5;
background-position: 0 -6px;
}
button.btn:active {
background-image: none !important;
text-shadow: none !important;
}
button.btn i {
background-image: url(https://twimg0-a.akamaihd.net/a/1326412195/phoenix/img/sprite-icons.png);
...
JavaScript
$('.btn.follow.following').live('mouseover mouseout', function(event) {
if (event.type == 'mouseover') {
$(".btn.follow.following").toggleClass("displaynone");
$(".btn.follow.unfollow").toggleClass("displaynone");
} else {
$(".btn.follow.following").toggleClass("displaynone");
$(".btn.follow.unfollow").toggleClass("displaynone");
}
});