0

We appear to have a BX slider image gallery on our SuiteCommerce Advanced store. When we initially had a sitebuilder store, we had to also create a thumbnail image to go with the item.

I have items with a large image and a small image, I want to be able to filter those particular images out. Fortunately, they're identifiable by their name.

I am able detect if the image contains "thumbnail" but I cannot get it to hide it's parent.

  var imgsrc = $('.bx-pager-link img').attr('src').split('/'); imgsrc = imgsrc[imgsrc.length - 1];

  $('.bx-pager-link img').each(function() {
    if ((imgsrc.indexOf("-thumb") != -1) || (imgsrc.indexOf("-TN.") != -1 )) { $(this).closest('div').remove(); }
  });

in this case, var imgsrc is image-thumbnail.jpg

I may be coding the .parent() or .closest() incorrectly.

flexdev
  • 13
  • 4

0 Answers0