prestashop サイトで PrettyPhoto バージョン 3.1.5 を使用していて、ピンタレスト ボタンを追加しようとしています。理想的には、js ファイル自体のコードを変更する必要はありません。
何らかの理由media
で、url
まだ未定義として戻ってきています...
<script type="text/javascript">
$(document).ready(function() {
{literal}
var photo_options = { social_tools: '<div class="twitter"><a href="http://twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></' + 'script></div><div class="facebook"><iframe src="//www.facebook.com/plugins/like.php?locale=en_US&href={location_href}&layout=button_count&show_faces=true&width=500&action=like&font&colorscheme=light&height=23" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:23px;" allowTransparency="true"></iframe></div><div class="pinterest"><a href="http://pinterest.com/pin/create/button/?url='+$(this).attr('href')+'&media='+$(this).attr('href')+'&description='+$(this).attr('title')+'" class="pin-it-button" count-layout="horizontal" target="_blank"><img border="0" src="http://assets.pinterest.com/images/PinExt.png"; title="Pin It" /></a></div>' };
{/literal}
$("a[rel^='prettyPhoto']").prettyPhoto(photo_options);
});
</script>
これは、画像をクリックした後に生成された html の一部です...
<div id="pp_full_res">
<img id="fullResImage" src="/modules/gallery/img/2bf766b19efd5410fa795f452b401186.jpg" style="height: 365px; width: 486px;">
</div>
試し$('#fullResImage').attr('src')
ましたが、まだ何もありません