Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

setTimeout function isnt working

Carol11
Kilo Expert


I have a div that is false and i make true to appear as a popup onclick - saying copied to clipboard. then i have a setTimeout to make the div dissappear.

 

Why is the setTimeout taking so long to start?   If i take the 300 away the div disappears too quickly. i want the popup to stay for 3 seconds and then disappear.

 

setTimeout (function(){ $scope.myVar = false; }, 3000);

 

 

thanks,

Carol

1 REPLY 1

Brad Tilton
ServiceNow Employee

How long does it take for the div to disappear?