Click to Toggle
#toggle-btn {
background: #00f;
}
#toggle-btn.clicked {
background: #f00;
}
var x = 0;
$('#toggle-btn').click(function(e){
if( x == 1 ){
//console.log('even');
$(this).removeClass('clicked');
x = 0;
} else {
//console.log('odd');
$(this).addClass('clicked');
x = 1;
}
e.preventDefault();
});