This code should work fine, but i don't know where it is getting stuck!
This code is very simple, and it should work, I think the problem is the 3rd parameter that is passed ("mouseup", function(){}, false)
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>html demo</title> </head> <body> <a id="navlink" href="http://google.com">Click me</a> <div id="Reveal">Not Clicked</div> <script> document.getElementById('navlink').addEventListener("mouseup" , function(e){ e.preventDefault(); document.getElementById('reveal').innerHTML("Clicked"); },false); </script> </body> </html>
e.preventDefault()is the problem?id="Reveal"sodocument.getElementById('Reveal').innerHTML = "Clicked"