Štěpán Heller Štěpán Heller - 3 months ago 14
HTML Question

How to change <a> to <div>?

I'm stuck with the following issue. On my page I need to remove the hyperlinks from portfolio elements (see image below).

portfolio elemente

The website is in Wordpress with Semplice template so I cannot go directly to the code but I'm stuck with jQuery. I tried to remove the

attribute from the
tag but no luck. The solution is probably in replacing the
tag with
but I wasn't able to do it. Can you please help me?


In your special case I will use jquery off,

In your code you should call it like this to match the way your website is using jquery:


This will disable all events on all anchors, I think you will need to edit the selector with something like '.thumb a' to disable just anchors you want not everything on the page.

With this solution, no need to replace any elements which will cause I lot of styling issues.