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

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -