Jquery to keep Height of Image / image container to same height height not working

Jquery to keep Height of Image / image container to same height height not working

Dear Sir

refer 


I want to keep the height of image part same  this webpage same

The jquery has adjusted the height of DIV (class='container1') perfectly  for all image on this page

this is because

  1. .container1 {
  2.    
  3.     height: 400px;    
  4.     overflow: hidden;
  5.     background: #fff;
  6.     margin: 10px;
  7. padding:10px;
  8.     text-align: center;
  9. vertical-align: middle;
  10.  
  11.  
  12. }

However i want name to be aligned properly ...this can happen 


html


  1. <div class="s-12 m-6 l-3" style="padding-top:10px; padding-left:20px;  padding-right:20px;"> 
  2.      
  3.                 <div class="container1" style="border:1px solid #CCC  ;" >
  4.   
  5.              <table width="70%" border="0" cellspacing="0" cellpadding="0" class="tblpart">
  6.   <tr>
  7.     <td align="center" class="imagepart" ><a href="<?php echo  $srows['bigwimage'];?>"    class="with-caption image-link"  title="<?php echo $srows['name'];?>"> <img src="<?php echo  $srows['smallwimage'];?>"  >
  8.     </a>
  9.     </td>
  10.   </tr>
  11.   <tr>
  12.     <td class="text22 namepart"><?php echo $srows['name'];?> </td>
  13.   </tr>
  14. </table>
  15.     
  16.                 
  17.       </div>
  18.        </div> 
  19.  



Jquery to keep height of container same

  1. <script type="text/javascript">
  2. $(document).ready(function() { 
  3.  
  4.  var maxHeight=0; 
  5. $('.imagepart').each(function() { 
  6.     maxHeight = Math.max(maxHeight, $(this).height()); 
  7.  
  8. }).height(maxHeight);
  9.  
  10. var maxHeight=0; 
  11. $('.namepart').each(function() { 
  12.     maxHeight = Math.max(maxHeight, $(this).height()); 
  13.  
  14. }).height(maxHeight);

  15. var maxHeight=0; 
  16. $('.tblpart').each(function() { 
  17.     maxHeight = Math.max(maxHeight, $(this).height()); 
  18.  
  19. }).height(maxHeight);

  20. var maxHeight=0; 
  21. $('.container1').each(function() { 
  22.     maxHeight = Math.max(maxHeight, $(this).height()); 
  23.  
  24. }).height(maxHeight+4);
  25. });
  26.   
  27. </script>  
I tried Developer tools : Console in chrome browser

I am getting following error

  1. product.php:1094 Uncaught TypeError: $(...).magnify is not a function