I have code below :
<div class="P1"> Testing OK <input type="button" value="OK1" id="bp1"> </div> <div class="P2"> Testing OK <input type="button" value="OK2" id="bp2"> </div> And jQuery code below :
$("#bp1").click(function(){ $(".P1").hide(); $(".P2").show(); }); But when it's not working.
Why ? And how to fix ?
Thanks you so much.
UPDATE It's working when I remove $(".P1").hide(); OR $(".P2").show(); from my code