What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-11-17 11:01:14
scroll to top in javascript duration
scrollToPageTopWithSlowAniemation(){ var scrollToTop = window.setInterval(function() { var pos = window.pageYOffset; if ( pos > 0 ) { window.scrollTo( 0, pos - 20 ); // how far to scroll on each step } else { window.clearInte... Add solution -
Other 2021-11-11 12:31:21
ruin the fun cookie clicker
#Hacks: # Type these in your console which you can open by # pressing STRG + SHIFT + J (Chrome) or STRG + SHIFT + K (Firefox) # changes the amount of cookies Game.cookies = amount in int # unlimted cookies Game.cookies = Infinity ... Add solution -
Javascript 2021-11-11 02:06:17
javascript css autoscroll
// If you don't know when data comes, you can set an interval: window.setInterval(function() { var elem = document.getElementById('yourDivWithScrollbar'); elem.scrollTop = elem.scrollHeight; }, 5000); // If you do know when data comes, you can do it ... Add solution -
Javascript 2021-10-06 14:16:05
auto form submition at countdown end javascript
/* HTML needed in the body before Javascript <div id="demo"></div> <form method="post" id="username"> <input type="text" name="usename" placeholder="Enter Username"> <... Add solution -
Other 2021-10-03 10:41:07
bootstrap change image every second
var counter = 1; //instantiate a counter var maxImage = 5; //the total number of images that are available setInterval(function() { document.querySelector('header').style.backgroundImage = "url('images/" + (counter + 1) + ".jpg')";... Add solution -
Html 2021-09-08 15:33:01
html timer
<!DOCTYPE HTML> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> p { text-align: center; font-size: 60px; margin-top: 0px; } </style> </head> <... Add solution -
PHP 2021-09-07 05:53:01
php auto scoll page with output
<script> var scroller = setInterval(function() { window.scrollTo(0,document.body.scrollHeight); }, 10); // update every 10 ms, change at will </script> <?php // generate 1000 lines of html code for($i=0; $i<1000; $i++){ echo $i... Add solution -
Javascript 2021-08-28 00:24:02
javascript autoscroll
// If you don't know when data comes, you can set an interval: window.setInterval(function() { var elem = document.getElementById('yourDivWithScrollbar'); elem.scrollTop = elem.scrollHeight; }, 5000); // If you do know when data comes, you can do it ... Add solution
Best helpers
Ranking is empty