Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

Remove # id From URL When Clicked On Href Link

<a class="scroll" href="#item1">Item1</a>
<script>
jQuery(document).ready(function($) {
    $(".scroll").click(function(event) {
    event.preventDefault();
    $('html,body').animate( { scrollTop:$(this.hash).offset().top } , 1000);
    } );
  } );
</script>
Comment

PREVIOUS NEXT
Code Example
Javascript :: Importing Ky Module In JavaScript 
Javascript :: "Uncaught (in promise) TypeError: dispatch is not a function" 
Javascript :: get value from createReadStream 
Javascript :: angular 13 deploy on tomcat 9 
Javascript :: phaser matrix rotate 
Javascript :: phaser wrap group 
Javascript :: react native ios accessibility font size 
Javascript :: Creating getLastBlock Object for blockchain 
Javascript :: js redirection captive portal 
Javascript :: Javascript Encapsulation Inheritance Polymorphism Composition 
Javascript :: difference between push and pop in javascript 
Javascript :: vue js beforeEach is not a function 
Javascript :: Create Built-in AbortController Object 
Javascript :: cookie in Auth header 
Javascript :: The JavaScript call() Method 
Javascript :: If you wish to set a method equal to another method in the class 
Javascript :: trigger oninput of input js 
Javascript :: load limited data and search data from all in angularjs 
Javascript :: pnpm tailwind react 
Javascript :: expact 
Javascript :: name of javascript virtual machine for apple 
Javascript :: simple JSX example 
Javascript :: js check that interactive element is not focused 
Javascript :: javascript asynchronous function list 
Javascript :: convert 12 hour to 24 hour javascript 
Javascript :: javascript change checkbox state 
Javascript :: multiple path names for a same component in react router v6 
Javascript :: generator function in javascript 
Javascript :: microbit hello world 
Javascript :: Accessing HTML attributes in DOM 
ADD CONTENT
Topic
Content
Source link
Name
7+4 =