Since my last question was marked as a duplicate, while it was not duplicated, and no one changes it, I just ask my question again.
I have a <a> which by default has a click function. This <a> also has a hang that I would like to keep.
How to disable click function, but keep hanging?
Ps, I would love to see a CSS solution!
Attention! Last time, my question was marked as a duplicate of this question: How to disable a link using only CSS? but pointer-events:none; also blocks freezing.
If it is still a duplicate, mark it as a duplicate of the question, which is really a duplicate.
Edit: I forgot to mention that my freeze happens like this: https://jsfiddle.net/7o3dbak7/7/
HTML:
<div class="container"> <ul> <li id="item1"><a href="somelinkthatistherebecauseitis">hoverable object</a></li> <li id="item2">text object, here comes alot of text explaining certain features of the website.</li> </ul> </div>
CSS
.container ul #item2 { display: none; width: 150px; padding: 20px; background: red; color: white; cursor: pointer } .container ul #item1 { pointer-events: none; } .container ul #item1:hover + #item2 { display: block; }
javascript jquery html css css3
Maarten wolfsen
source share