I have click functions in jQuery to show/hide different content:
$(“#button1”).click(function() {
$(“#project1”)[0].style.display = "block";
$(“#project2”)[0].style.display = “none”;
});
$(“#button2”).click(function() {
$(“#project1”)[0].style.display = “none”;
$(“#project2”)[0].style.display = “block”;
});
I want to have an identical URL in each situation. For example when #project1
is shown I want the URL in the webpage different than the URL when #project2
is shown.
Now it is always https://…./..../projects/index.html
How can I do it?