Reputation: 1603
I am trying to use the profile widget from pinterest found here. In my site it loads perfectly, but if I click on the images the links do not work.
I tried doing the same on a new ASP MVC project and it was working perfectly.
This is the code I'm using:
<a data-pin-do="embedUser" href="http://www.pinterest.com/mysite/" data-pin-scale-height="295" data-pin-board-width="310">Visit MySite profile on Pinterest.</a>
<!--pintrest-->
<script type="text/javascript" async src="//assets.pinterest.com/js/pinit.js"></script>
Upvotes: 0
Views: 488
Reputation: 33
As Matthew pointed out, it's probaby the prefixes. But you need to fix one more — in the script itself. Just follow the url, copy and paste the destination code (instead of calling the provided one). Add an http prefix to the assets URL. That's it. Worked for me.
<script>!function(a,b,c){var d,e,f;f="PIN_"+~~((new Date).getTime()/864e5),a[f]||(a[f]=!0,a.setTimeout(function(){d=b.getElementsByTagName("SCRIPT")[0],e=b.createElement("SCRIPT"),e.type="text/javascript",e.async=!0,e.src=c,d.parentNode.insertBefore(e,d)},10))}(window,document,"http://assets.pinterest.com/js/pinit_main.js");</script>
Upvotes: 1
Reputation: 851
If you are running your file locally from a hard drive, the paths might not render correctly since the src attribute or your script tag is prefixed with //
. This means it will use the file prefix instead of http when trying to retrieve additional items if those links also are prefixed with '//'. Change it to the following to see if it works:
<script type="text/javascript" async src="http://assets.pinterest.com/js/pinit.js"></script>
Upvotes: 0