What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-10-05 07:55:03
simple parallax button scrolling jquery codepen
/* jQuery codes for smooth scrolling. The following code is from https://css-tricks.com/snippets/jquery/smooth-scrolling/*/$(function() { $('a[href*=#]:not([href=#])').click(function() { if (location.pathname.replace(/^\//, '') == this.pathname.repl... Add solution -
-
Other 2021-09-28 02:59:03
show navbar on specific div
$(document).ready(function(){ $(".navbar").hide(); //Hide the navigation bar first $(window).scroll(function () { //Listen for the window's scroll event if (isScrolledAfterElement("#content")) { //if it has scrolled be... Add solution -
Javascript 2021-09-23 12:49:04
get user time using timezone javascript
function calcTime(city, offset) { // create Date object for current location var d = new Date(); // convert to msec // subtract local time zone offset // get UTC time in msec var utc = d.getTime() + (d.getTimezoneOffset() * 60000)... Add solution -
Javascript 2021-09-23 05:09:03
default value input date js
<!-- HTML --> <input type="date" id="theDate"> <script> // JQuery $(document).ready( function() { $('#theDate').val(new Date().toDateInputValue()); }); // Pure JS document.getElementById('theDate').v... Add solution -
Other 2021-09-21 22:49:04
links and when you click on these link it will scroll the page to the respective section.
$("nav").find("a").click(function(e) { e.preventDefault(); var section = $(this).attr("href"); $("html, body").animate({ scrollTop: $(section).offset().top }); }); Add solution -
Javascript 2021-09-14 00:54:04
canvas cut path to image
// canvas related variables var canvas=document.getElementById("canvas"); var ctx=canvas.getContext("2d"); var cw,ch; var $canvas=$("#canvas"); var canvasOffset=$canvas.offset(); var offsetX=canvasOffset.left; var offsetY=can... Add solution
Best helpers
Ranking is empty