You can try something like this:
<button class="js-btn"></button>
$(function(){
$(".js-btn").on("click",function(){
window.location = "..../#div3";
});
})
The string "..../#div3"represents the relative URL of your page and has at the end #div3. Thus, using window.location, you will be redirected to the desired page and with the help #div3to the desired section.
source
share