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

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

android - How to create dynamically Fragment pager adapter -

1111. appearing after print sequence - php -