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 -

python - ValueError: No axis named 1 for object type <class 'pandas.core.series.Series'> -

java - How to provide dependency injections in Eclipse RCP 3.x? -