Ask away

Fade in fade out in js code

Pam 12/06/17 11:59

43 views

Question CategoryMiscellaneous,Component

Number of completed projects0

Question StatusUnsolved

  • JS code
  • android
  • nest component

Question

I am working on the NEST IDE and components. Tried with bootstrap. failed. hence trying simple js I have a function which returns text to html by document.getElementById("temp").innerHTML = Centigrade+"° C , It's Cool !!! "+"<img src= \"img/Tlogo2.svg\"/>"; when I trigger this button: <div style="position: absolute; left: 30px; top: 65px;"> <img src="img/temlogo.svg" width="50" height="50" onclick="foo(myCallback);"/> </div> If I want to fade out that text say after 1 min as a pop up by any pop up function (not with alert) then what to do?

Answers

1
Brad 01/01/18 14:22

Are you trying to create your own pop-over? Just initialize or reset a timeout variable whenever the pop-over pops. function foo(callback) { make_the_popover_show(); popoverTimeout = setTimeout(clearPopover, 1000); } function clearPopover() { hide_the_popover(); } Be sure to add identifiers to your pop-overs and to different timeouts, if you plan on showing multiple pop-overs at the same time.

Answer

Project

Image

Comment