Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <body>
- <p>This example calls a function which performs a calculation, and returns the result:</p>
- <p id="demo"></p>
- <script>
- function isitnew(thinggiven)
- {
- //this is supposed to check to see if the last updated panel is "new"
- //"new" being defined here as the [updated panel] being posted less than 2 days ago from this date
- var updatetime = Date.parse(thinggiven);
- document.getElementById("demo").innerHTML = msec;
- //this gives milsecs for updatetime1
- var currenttime = getTime() ;
- //grabs milliseconds for current time
- if updatetime > currenttime - 172800000
- //if it has been more than 2 days since an update
- {
- return true;
- }
- }
- //displaying the thing
- var image = document.getElementById("new1");
- //defines new1 as a thing to look for
- if isitnew("August, 20 2016") == true
- {
- image.style.display = 'block';
- //this is where the magic happens
- }
- //the last updated time (thing given) goes there
- </script>
- <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>
- <div style="z-index: 100; left: 0px; position: absolute; top: 0px; color:pink;">
- <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>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement