Réponse post forum hadware (#148345) : jQuery
https://forum.hardware.fr/hfr/Programmation/PHP/probleme-refresh-event-sujet_148345_1.htm
by GregS11
HTML
<div id="container">
<input type="button" id="action-connect" value="connect"/>
<span id="action-text" style="display:none;">Connected</span>
</div>
JavaScript
$(()=>{
$('div#container').on('click','input#action-connect',()=>{
$("input#action-connect").hide();
$("span#action-text").show();
//For test purpose : Reset after 3s timeout
setTimeout(()=>{
$("input#action-connect").show();
$("span#action-text").hide();
},3000);
});
});