javascript - How to make trigger click event work after turning off event -


i have card click should disabled 3 secs , after 3 secs click event should trigger on card isn't working.

$('#card').off('click');  settimeout(function () {     $('#card').on('click');     $('#card').trigger('click');         }, 3000); 

on , off in jquery event delegation different purpose, requirement add disabled property card prevent users clicking , trigger click using settimeout

 $('#card').prop('disabled','disabled');   settimeout(function () {     $('#card').removeprop('disabled');     $('#card').trigger('click');          }, 3000); 

Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -