title: jQuery element.closest(…).attr is not a function
body: <p>This script was functioning correctly until I updated Joomla 2.5 to 3.7, php5.6 to php7 and http to https (site in SSL). Jquery is being called correctly.
  I don't know which of the updates is affecting the script but I believe it is since I updated to php7:</p>
  
  <pre><code>$(function(){
      $('.thumbs img').mouseenter(function(){
          var $bigImage = $(this).closest('.annonces').find('.bigimage');
          $bigImage.attr('src',$(this).attr('src').replace('180__','600__'));    
      });
  });
  </code></pre>
  
  <p>When I'm trying to run it I'm getting this error:</p>
  
  <blockquote>
    <p>TypeError: $(...).closest(...).find is not a function</p>
  </blockquote>
  
  <p>Here is the html:</p>
  
  <pre><code>echo '&lt;div class="annonces"&gt;';
  
  //images &gt; 768px
  
  if ($book[9])
  {
  echo '&lt;div class="photosbig"&gt;&lt;div class="annoncephoto1" &gt;
  &lt;img class="bigimage" src="/annonce/600__' . $book[9] . '" /&gt;&lt;/div&gt;';
  } 
  echo '&lt;div class="annonces_legende" style="font-style:italic;"&gt;
  Passez la souris sur une vignette pour voir l’image apparaître ci-dessus. 
  &lt;br /&gt;Cliquez pour agrandir l’image.&lt;/p&gt;&lt;/div&gt;';
  echo '&lt;div class="annoncephoto2" &gt;';
  echo '&lt;div class="thumbs" &gt;';
  if ($book[9])
  {
  echo '&lt;a href="/annonce/' . $book[9] . '" rel="shadowbox"&gt;
  &lt;img src="/annonce/180__' . $book[9] . '" /&gt;&lt;/a&gt;';
  }
  if ($book[10])
  {
  echo '&lt;a href="/annonce/' . $book[10] . '" rel="shadowbox"&gt;
  &lt;img src="/annonce/180__' . $book[10] . '" /&gt;&lt;/a&gt;';
  }
  if ($book[11])
  {
  echo '&lt;a href="/annonce/' . $book[11] . '" rel="shadowbox"&gt;
  &lt;img src="/annonce/180__' . $book[11] . '" /&gt;&lt;/a&gt;';
  }
  if ($book[12])
  {    
  echo '&lt;a href="/annonce/' . $book[12] . '" rel="shadowbox"&gt;
  &lt;img src="/annonce/180__' . $book[12] . '" /&gt;&lt;/a&gt;';
  }
  if ($book[17])
  {
  echo '&lt;a href="/annonce/' . $book[17] . '" rel="shadowbox"&gt;
  &lt;img src="/annonce/180__' . $book[17] . '" /&gt;&lt;/a&gt;';
  }
  if ($book[18])
  {
  echo '&lt;a href="/annonce/' . $book[18] . '" rel="shadowbox"&gt;
  &lt;img src="/annonce/180__' . $book[18] . '" /&gt;&lt;/a&gt;';
  }
  echo '&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;';
  }
  </code></pre>