learning-zone / javascript-basics

JavaScript Basics
https://learning-zone.github.io/javascript-basics/
1.75k stars 616 forks source link

Website: user not redirected on clicking on 1st link #11

Closed pratik-choudhari closed 3 years ago

pratik-choudhari commented 3 years ago

On website, when first option in the table is clicked What is difference between document.getElementById() and document.querySelector()?, user is not redirected to the QnA section beneath the table.

The reason is a mismatch in ids.

The table entry link:

<a href="#q-what-is-difference-between-document-getelementbyid-and-document-queryselector">What is difference between document.getElementById() and document.querySelector()?</a>

QnA section header:

<h2 id="q-what-is-difference-between-documentgetelementbyid-and-documentqueryselector">Q. <strong><em>What is difference between document.getElementById() and document.querySelector()?</em></strong></h2>

h2 tag id is missing a few hyphens

learning-zone commented 3 years ago

Fixed link redirecting issue.