i am trying to force some change on an input button with inline style. I use the html function of jQuery. It works the first time when i click on the + button, but not working when i click on the - button
<div id='div_bouton_moins'><input type=button value='-' id='bouton_moins' style='background-color:green !important'></div>
<div id='div_bouton_plus'><input type=button value='+' id='bouton_plus' style='background-color:red !important'></div>
$('#bouton_moins').click(function(){
$('#div_bouton_plus').html("<input type=button value='+' id='bouton_plus' style='background-color:red !important'>")
$('#div_bouton_moins').html("<input type=button value='-' id='bouton_plus' style='background-color:green !important'>");
});
$('#bouton_plus').click(function(){
$('#div_bouton_plus').html("<input type=button value='+' id='bouton_plus' style='background-color:green !important'>");
$('#div_bouton_moins').html("<input type=button value='-' id='bouton_plus' style='background-color:red !important'>");
});
https://jsfiddle.net/z148xexp/
thanks all