How to add and immediately remove html element by jquery -


i have button , want create or append element when clicking , after 1 sec has removed automatically how can it

you can try

  $('#btnid').click(function(){  $( "#divid" ).append( "<p id="test">test</p>" );       settimeout(function(){       $('#test').remove();     }, 1000);     }) 

Comments

Popular posts from this blog

'hasOwnProperty' in javascript -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

How to understand 2 main() functions after using uftrace to profile the C++ program? -