javascript - prompt box can't popup again after it disappeared -



javascript - prompt box can't popup again after it disappeared -

i want popup prompt box when user click trash button. whatever clicked in prompt box, can't popup 1 time again after box disappeared.

html:

<div class="prompt" id="del_product" style="display:none;"> <p>do confirm delete product?</p> <a class="promptbtn" id="cancel_del">cancel</a> <a class="promptbtn" id="confirm_del">ok</a> </div>

jquery:

$(".delbtn").click(function(){ $('#del_product').show() }); $('#cancel_del').click(function(){ $(this).parent().hide() }); $('#confirm_del').click(function(){ $(this).parent().hide() //....will });

how prepare it? thanks

note generally, improve practice not hide .parent(), .closest('.prompt') or closest '#del_product' ... prevents issues, additional tags might included either or browser. or cms.

javascript jquery

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -