If you want to add the “Pin it” button over the picture opened with fancybox, this is a simple way to do it:
[av_icon_box icon=’ue881′ font=’entypo-fontello’ position=’left’ title=’Add the following line in the template file’ link=” linktarget=”] <script type=”text/javascript” src=”//assets.pinterest.com/js/pinit.js”></script>[/av_icon_box] [av_icon_box icon=’ue836′ font=’entypo-fontello’ position=’left’ title=’Edit the  Fancybox js file, “jquery.fancybox-1.3.4.js”, in my case’ link=” linktarget=”] Here, locate the set_navigation function (
_set_navigation = function() { ) and inside it add the following line:
$('#fancybox-content').append('<a data-pin-config="above" href="//pinterest.com/pin/create/button/?url=' + $(location).attr('href') + '&media=' + imgPreloader.src + '&description=' + selectedOpts.title + '" data-pin-do="buttonPin" id="custompinit" target="_blank"><img src="//assets.pinterest.com/images/pidgets/pin_it_button.png" /></a>');
You can control the position and styling with the custom id added to the link ( id="custompinit" ).
[/av_icon_box]

Leave a Reply
You must be logged in to post a comment.