What do you want to save?
Add Code snippet
New code examples
-
Javascript 2022-03-24 09:55:05
javascript get cursor position without event
var Cursor_X; var Cursor_Y; document.addEventListener('mousemove', onMouseUpdate, false); document.addEventListener('mouseenter', onMouseUpdate, false); function onMouseUpdate(e){ Cursor_X = e.pageX; Cursor_Y = e.pageY; } Add solution -
Javascript 2022-03-18 04:50:03
how to click outside dom in javascript
// jQuery $(window).click(function() { //Hide the menus if visible }); // JavaScript const getBody = document.querySelector('body'); getBody.addEventListener('click', () => { //Hide the Menus if Visible }); // Stop Propogation on Element you want... Add solution -
Other 2022-03-16 09:30:04
bootstrap hide navbar
const navLinks = document.querySelectorAll('.nav-item') const menuToggle = document.getElementById('navbarSupportedContent') const bsCollapse = new bootstrap.Collapse(menuToggle) navLinks.forEach((l) => { l.addEventListener('click', () => { bsCo... Add solution -
Javascript 2022-03-13 04:45:06
javascript touch scroll event
var lastTouch = null window.addEventListener('touchstart', function (event) { lastTouch = event.touches[0] }) window.addEventListener('touchend', function (event) { lastTouch = null }) window.addEventListener('touchmove', function (event) { var c... Add solution