How To Create A Custom Pinterest “Pin It” Button For Your Website

Libby Fisher came up with this nice code snippet and shared it on ICode4You, which I thought would also be worth sharing here on Blogfreakz. It’s a JavaScript code that lets you create a “Pin It” button using a custom graphic for your website. Copy it and enjoy sharing your favorite images in Pinterest!

ScreenHunter 30 Aug. 13 07.42 How To Create A Custom Pinterest “Pin It” Button For Your Website

<div>
<a href=”javascript:void((function(){var%20e=document.createElement(‘script’); e.setAttribute(‘type’,'text/javascript’); e.setAttribute(‘charset’,'UTF-8′); e.setAttribute(‘src’,’http://assets.pinterest.com/js/pinmarklet.js?r=’+Math.random()*99999999);document.body.appendChild(e)})());”> <img src=”images/pinit.jpg” alt=”Pin It” /></a>
</div>

Be sure that you change the path to the image in the code above so that it will point to the graphic that you want to use for the “Pin It” button. Also, you can substitute the text for the graphic if you want.

Incoming search terms for the article:

Related Posts

How to Create Elegant Patterned Web Design

Turn A Photo Into A Vector Portrait With Photoshop

Correctly Embed Watermarks In Portrait And Landscape Photos Using Conditional Actions In Photoshop CS6.1

Oregon-Inspired Photoshop Tutorial

1 Comment

  1. Lakshmi Balu

    08.14.2012

    That code is a real goody I think. You have made it so easy for the non coders. Thanks a ton!