Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

navigate-to-an-anchor-on-another-page

//____________________________IN HTML_______________________________________
<section>
    <a id="section1">
        CONTENT
    </a>
</section>

<a href="different-page.html#section1">Section One</a>

//____________________________IN REACT_______________________________________
//npm i react-router-hash-link in CONSOLE
import { HashLink as Link } from 'react-router-hash-link';

<Link to="home-page#section-three">Section three</Link>
Comment

PREVIOUS NEXT
Code Example
Javascript :: how to return 5 records instead of 10 records in datatable 
Javascript :: image base64 to file javascript 
Javascript :: js json groupby prop 
Javascript :: how to get array from items quantity 
Javascript :: useState settoggle 
Javascript :: javascript backticks 
Javascript :: toggle class javascript and jquery 
Javascript :: getters in nuxt vuex acccessing 
Javascript :: math.rount 
Javascript :: ffmpeg convert mp4 to avi 
Javascript :: javascript dataurl to blob 
Javascript :: mongoose populate filter 
Javascript :: add border to view react native 
Javascript :: js keydown only once 
Javascript :: js close window 
Javascript :: committing only part of a file git 
Javascript :: filter includes array 
Javascript :: javascript submit a form with id 
Javascript :: responsive grid using antd 
Javascript :: javascript insert last character of string 
Javascript :: reload table jquery 
Javascript :: express limit based on ip 
Javascript :: get all the properties of a object in javascript 
Javascript :: javascript caps lock 
Javascript :: how to use absolute path in react 
Javascript :: why does my page reloads on form submission 
Javascript :: moment day in range 
Javascript :: in puppeteer wait for page untile certain selector have certain value 
Javascript :: js sort 1 or -1 
Javascript :: bottom tab navigator react native transparent 
ADD CONTENT
Topic
Content
Source link
Name
3+9 =