Pinterest Pin It Code - How to make it a Pop Up Window?

Scorpion Ghost

Elite Member
Executive VIP
Jr. VIP
Joined
Mar 22, 2013
Messages
9,156
Reaction score
10,492
Hey everyone. Two days ago i got this code for a pinterest hover pin it code, and i installed it on my blogger blog, and i set an image of my own as the icon, and everything is perfect. However, i have one issue i need help with...

When the Pin It icon is clicked, it opens in a New Tab, but i would like to make it open in a Pop Up window. Is it possible to do this??

Here is the code i am using:

Code:
<script>
//<![CDATA[
var bs_pinButtonURL = "http://2.bp.blogspot.com/-rwtYRUjgDok/UiJ-EfGfrbI/AAAAAAAAAXg/QXRpDUzaa6s/s1600/Pinterest+Red.png";
var bs_pinButtonPos = "topright";
var bs_pinPrefix = "";
var bs_pinSuffix = "";
//]]>
</script>
    <script src='http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js' type='text/javascript'/>
<script id='bs_pinOnHover' src='http://greenlava-code.googlecode.com/svn/trunk/publicscripts/bs_pinOnHoverv1_min.js' type='text/javascript'>
// Visit http://www.bloggersentral.com/2012/11/pinterest-pin-it-button-on-image-hover.html for details.
</script>



I did try finding a solution to this, but failed... And keep in mind im a noob for codes and HTML's and Javascripts etc, so if there is a solution please be descriptive...

Thank you :)
 
Post unobfuscated JavaScript then maybe we can work something out.
greenlava-code.googlecode.com/svn/trunk/publicscripts/bs_pinOnHoverv1_min.js - this code is minified - unreadable


The other solution is to develop the Pinterest hover script from scratch
 
Actually after noticing that It has been 3 months since you asked and no one solved the problem. I decided to give it a closer look. Enjoy:

Code:
$(function() {
    $('body').on('click', '.pinit-wrapper', function() {
        event.preventDefault();
        window.open($('.pinit-wrapper a[href]').attr('href'), "_blank", ' width=500, height=500')
    })
})

This works with jQuery 1.7+
 
:You_Rock_ :30: :target:


It Wooorks!!! :AR15firin

This was one of the very few things i gave up on, for the time being. First i tried to do it myself, that didn't work. Then I asked on 5-6 forums, and nobody knew anything. Even on Stack Overflow I got nothing...

Brother, what can i do for you? :D Big Big Big Thanks...


For any other noobs like me, the code that CodeNinja gave needs to be inserted between
AND
</script>

haha i started from the bottom going up, wasn't sure where to put the code you gave.

Well, thread closed, SOLVED!

p.s If i could i'd click the Thanks button 50 times right now :clap2:
 
Last edited:
Back
Top