Jump to content
pcgameslab

How to insert a link on image using javascript ?

Recommended Posts

On my blog,there's a social sharing widget at the right looking something like this:-

39Io1K8.png

and there's a hover effect on the images of social media sites but I can't find any way to add links on this images in such a way that when anyone clicks on it ,is redirected to the desired link and the hover effect will remain existing

Share this post


Link to post
Share on other sites

Usually you would find the widget in question, and add your links to your specific social media links manually, as widgets are unable to do this themselves.

Share this post


Link to post
Share on other sites

Then if you can access html, find out the links to social media and apply to href for that specific anchor link, then you will have to add a class that will signify that it was clicked, as using :visited is restricted to specific styles I.E.border background colour because of security to prevent identifying what pages users have visited. Also this would be difficult to apply to link that opens a different domains, it is usually applied to a page on same domain, where you can identify what page you are on by looking at address url.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...