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

javascript - Knockout pushing observable and computed data to an observable array -

'hasOwnProperty' in javascript -

Trouble making a JSON string -