When I open my page at http://www.mywebsite.com/ where I have this jQuery code :
$('#locSlideButton2').click(function() {
});
I'd like, clicking on the locSlideButton2
element, add an hash (such as #example) to the url, without make any redirect.
How can I do it?
First add the hundreds place digit in second number with the first number: 953 + 800 = 1753. Then add the then place digit in second number with the result obtained in previous step: 1753 + 60 = 1813. Next add the units place digit in the second number with the result obtained in Step 2: 1813 + 7 = 1820.
Using plain old vanilla JS:
window.location.hash='example';
MDN on window.location
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With