Sample code
<a href="page" style="text-decoration:none;display:block;"> <span onclick="hide()">Hide me</span> </a>
Since the a tag is over the span is not possible to click it. I try z-index but that didnt work
<a href="http://the.url.com/page.html"> <span onclick="hide(); return false">Hide me</span> </a>
This is the easiest solution.
When you click on hide me
, both a and span clicks are triggering. Since the page is redirecting to another, you cannot see the working of hide()
You can see this for more clarification
http://jsfiddle.net/jzn82/
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