What do you want to save?
Add Code snippet
New code examples
-
Other 2022-02-21 13:40:11
javascript-change color onclick()
const btn = document.querySelector('button'); function random(number) { return Math.floor(Math.random() * (number+1)); } btn.onclick = function() { const rndCol = 'rgb(' + random(255) + ',' + random(255) + ',' + random(255) + ')'; document.body.st... Add solution -
Other 2022-01-30 01:25:48
session timeout minutes for in 1*60 *1000
var IDLE_TIMEOUT = 2700; //seconds 45min var _idleSecondsCounter = 0; document.onclick = function() { _idleSecondsCounter = 0; }; document.onmousemove = function() { _idleSecondsCounter = 0; }; document.onkeypress = function() { _idleSecondsCounte... Add solution -
Other 2022-01-29 03:10:16
how to use toast using bootstrap5
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" hr... Add solution -
Javascript 2021-11-16 00:39:18
legend on click use default chartjs
// How to implement a custom behaviour when clicking on a legend element var original = Chart.defaults.global.legend.onClick; Chart.defaults.global.legend.onClick = function(e, legendItem) { /* do custom stuff here */ original.call(this, e, legendItem... Add solution -
Javascript 2021-11-11 01:53:15
var notification = new Notification
// request permission on page load document.addEventListener('DOMContentLoaded', function() { if (!Notification) { alert('Desktop notifications not available in your browser. Try Chromium.'); return; } if (Notification.permission !== 'granted') ... Add solution -
Other 2021-11-07 00:05:18
on click change color of text
<!DOCTYPE html> <html> <head> <title>Change Color</title> </head> <body> <button id="changeGreen">Change Font Color Green</button> <button id="changeRed">Change Font Color... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5