Q: Cant pull attr data with javascript, coming back as undefined Im using PrettyPhoto Version 3.1.5 in a prestashop site, and am attempting to add a pinterest button, I would ideally not like to have to change the code in the js file itself.
For some reason media and url is still coming back as undefined...
    <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>

Here is part of the generated html after you click on the image...
<div id="pp_full_res">
<img id="fullResImage" src="/modules/gallery/img/2bf766b19efd5410fa795f452b401186.jpg" style="height: 365px; width: 486px;">
</div>

I tried $('#fullResImage').attr('src') but still nothing
