changeImageOnHover() {
    // check if is in the special item category.
    const isSpecialItemCategory = this.isSpecialItemCategory();

    // if is onn the special category change the image on hover.
    if (isSpecialItemCategory) {
      const $images = $('.card-figure');
      $images.hover(
        function () {
          $(this)
            .find('img.card-image')
            .attr(
              'srcset',
              (_, currentValue) =>
                'https://cdn11.bigcommerce.com/s-ygbdkye24d/images/stencil/500x659/products/112/376/daniel-tomlinson-fFJqJ_GWxxk-unsplash__96050.1629489615.jpg',
            );
        },
        function () {
          $(this)
            .find('img.card-image')
            .attr(
              'srcset',
              (_, currentValue) =>
                'https://cdn11.bigcommerce.com/s-ygbdkye24d/images/stencil/500x659/products/112/377/brandon-lee-jT5mSPEteVc-unsplash__02860.1629489619.jpg?c=1',
            );
        },
      );
    }
  }
// method to change the image on hover.
method to change the image on hover.
method to change the image on hover .
changeImageOnHover() {
    const isSpecialItemCategory = this.isSpecialItemCategory();
    if (isSpecialItemCategory) {
      const $images = $('.card-figure');
      $images.hover(
        function () {
          $(this)
            .find('img.card-image')
            .attr(
              'srcset',
              (_, currentValue) =>
                'https://cdn11.bigcommerce.com/s-ygbdkye24d/images/stencil/500x659/products/112/376/daniel-tomlinson-fFJqJ_GWxxk-unsplash__96050.1629489615.jpg',
            );
        },
        function () {
          $(this)
            .find('img.card-image')
            .attr(
              'srcset',
              (_, currentValue) =>
                'https://cdn11.bigcommerce.com/s-ygbdkye24d/images/stencil/500x659/products/112/377/brandon-lee-jT5mSPEteVc-unsplash__02860.1629489619.jpg?c=1',
            );
        },
      );
    }
  }
changeImageOnHover ( ) { const isSpecialItemCategory = this . isSpecialItemCategory ( ) ; if ( isSpecialItemCategory ) { const $images = $ ( '.card-figure' ) ; $images . hover ( function ( ) { $ ( this ) . find ( 'img.card-image' ) . attr ( 'srcset' , ( _ , currentValue ) => 'https://cdn11.bigcommerce.com/s-ygbdkye24d/images/stencil/500x659/products/112/376/daniel-tomlinson-fFJqJ_GWxxk-unsplash__96050.1629489615.jpg' , ) ; } , function ( ) { $ ( this ) . find ( 'img.card-image' ) . attr ( 'srcset' , ( _ , currentValue ) => 'https://cdn11.bigcommerce.com/s-ygbdkye24d/images/stencil/500x659/products/112/377/brandon-lee-jT5mSPEteVc-unsplash__02860.1629489619.jpg?c=1' , ) ; } , ) ; } }
method to change the image on hover.
method to change the image on hover .
// check if is in the special item category. // if is onn the special category change the image on hover.