a href to DIV causing img issues

a href to DIV causing img issues

I am trying to link an automatically created series of thumbnails so when someone clicks on one, it opens in a div that will display the full version of the photo.

When I click the link, it opens in the DIV but instead of the picture I get a lot of:
����JFIF��C     ��C  ��X�"�� ��J!1A"Qaq2� #B���Rb����$3�r�� 4C%�5Sc�������7!1AQ"2aq����#B���3R�b��� ?�����nح�>��Q<9���}�ڇm�`�޶�ҘV�������������F1�V � ������(nL���V�`�j.�����=�N4�Z����c�`�!����W��-4w�r,ˣhR� 


Here is the code:
  1. <script type="text/javascript" src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
  2. <script type="text/javascript">
  3. $(function(){
  4. $('#nav a').click(function(e) { 
  5.   $('#content').hide().load( $(this).attr('href') , function(){
  6. $('#content').show()
  7.   })
  8.   return false
  9. })
  10. })
  11. </script>
And the a href I'm trying to pull from:

  1. <a href="<?php echo $image_path; ?>">
  2. <img src="<?php echo $thumbnail_path; ?>" alt="" title=""/>
  3. </a>
If I remove or comment the javascript, the link opens properly in its own window.

Thank you in advance for any guidance you may have.
bh