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 -
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 -
Other 2021-09-04 05:06:01
simple button scrolling with this
// Select all »a« elements with a parent tag »nav« and add a function that is executed on click $('#id a').on('click', function (e) { // Define variable of the clicked »a« element (»this«) and get its hr... Add solution
Best helpers
Ranking is empty