Advertisement
lavendersiren

I'm not sure how much more of this I can handle

Aug 25th, 2016
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <body>
  4.  
  5. <p>This example calls a function which performs a calculation, and returns the result:</p>
  6.  
  7. <p id="demo"></p>
  8.  
  9. <script>
  10. function isitnew(thinggiven)
  11. {
  12. //this is supposed to check to see if the last updated panel is "new"
  13. //"new" being defined here as the [updated panel] being posted less than 2 days ago from this date
  14.  
  15. var updatetime = Date.parse(thinggiven);
  16. document.getElementById("demo").innerHTML = msec;
  17.  
  18. //this gives milsecs for updatetime1
  19.  
  20. var currenttime = getTime() ;
  21. //grabs milliseconds for current time
  22.  
  23. if updatetime > currenttime - 172800000
  24. //if it has been more than 2 days since an update
  25. {
  26. return true;
  27. }
  28.  
  29. }
  30.  
  31. //displaying the thing
  32. var image = document.getElementById("new1");
  33. //defines new1 as a thing to look for
  34.  
  35. if isitnew("August, 20 2016") == true
  36. {
  37. image.style.display = 'block';
  38. //this is where the magic happens
  39. }
  40. //the last updated time (thing given) goes there
  41.  
  42. </script>
  43.  
  44. <div class="container" style="position: relative"> <a href="sj1.html"> <span class="locked"></span> <img src="http://jingloria.x10.mx/sbargrewrite/niki1.png" onmouseover="this.src='http://jingloria.x10.mx/sbargrewrite/niki1.png'" onmouseout="this.src='http://jingloria.x10.mx/sbargrewrite/niki1_bl.png'" /></a>
  45.  
  46. <div style="z-index: 100; left: 0px; position: absolute; top: 0px; color:pink;">
  47. <img alt="top image" id="new1" style='visibility: hidden' src="http://jingloria.x10.mx/sbargrewrite/new.gif"><p>Last updated: <br>8/25/2016</p><!-- change it here --></div> </div>
  48.  
  49.  
  50.  
  51. </body>
  52. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement