html - Remove link but keep image with CSS -
i've got following piece of code (example):
<div class="abc">     <a href="/link/link">         <img src="/link/image">     </a> </div> i need able keep image remove link using css can't alter html. there way of achieving this?
this not possible css only. jquery :
$(".abc a").click(function(event){     event.preventdefault(); });  edit : pure js solution
var links = document.queryselectorall('.abc a'); (var = 0; < links.length; i++) {     links[i].href= "javascript:;"; }  finally set cursor default css :
.abc { cursor: default; } 
Comments
Post a Comment