📜 ⬆️ ⬇️

Making clickable images

img

It is very practical to draw out clickable pictures, for example, when you hover over a picture, images will appear indicating that this picture is clickable - as in the picture above.


How it works?


The java script script will find clickable pictures and overlay another layer () on them, which we will see when hovering the cursor over the picture.
')
imagelink

Simply put, the script will replace
  <a href="/somelink"> <img src = "image.jpg" alt = "My Image" /> </a> 

on
  <a href="/somelink"> <img src = "image.jpg" alt = "My Image" /> <span> </ span> </a> 


How to install?


I will not describe an installation example, I will better give a ready-made example!

Download / Look


The script, by the way, is simple as “two and two”, and takes only 2 kilobytes.
Download the finished sample.

View finished example


Source: Chernev.Ru - Webmasters blog

Source: https://habr.com/ru/post/22334/


All Articles