Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Кто знает что за функция


sheff88
 Share

Recommended Posts

<div class="image"><a href="{{ product.href }}">
               <img itemprop="image" src="{{ product.thumb }}" img-aux-src="{{ product.thumb2 }}" alt="{{ product.name }}" title="{{ product.name }}" onmouseover="productListImageChangeHover($(this))" onmouseout="productListImageChangeHover($(this))" class="img-responsive" /></a>
            </div>

 

Собственно функция productListImageChangeHover, выдает ошибку Uncaught ReferenceError: productListImageChangeHover is not defined
    onmouseout https://greenrose.market/index.php?route=product/category&path=1_2:1

Link to comment
Share on other sites


<script>
   function productListImageChangeHover(element) {
       var src = element.attr('img-aux-src');
       var dataauxsrc = element.attr('src');
       if (element.length > 0 && element.attr('img-aux-src')) {
           element.attr('src', src);
           element.attr('img-aux-src', dataauxsrc);
       }
   }
</script>

 

нашел, но опять все через ж.. img-aux-src на openserver нормально отображает 2-ю картинку, а на впс img-aux-src пустой, чудеса.

Link to comment
Share on other sites


11.08.2022 в 13:12, sheff88 сказал:

нашел, но опять все через ж.. img-aux-src на openserver нормально отображает 2-ю картинку, а на впс img-aux-src пустой, чудеса.

Значит ошибка в конвертации изображений, возможно из-за версии php или изображений нет.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.