JSFiddle - React, Tailwind, and code Playground

by mtenschert

JavaScript

var initalProductPill = document.getElementsByClassName('product__content')[0];
// console.log(initalProductPill);

// Options for the observer (which mutations to observe)
var config = { attributes: true, childList: true, subtree: true };

// Callback function to execute when mutations are observed
var callback = function(mutationsList, observer) {
    for(var mutation of mutationsList) {
        if (mutation.type == 'childList') {
           
           
           
        }
    }
};

// Create an observer instance linked to the callback function
var observer = new MutationObserver(callback);

// Start observing the target node for configured mutations
observer.observe(initalProductPill, config);

// Later, you can stop observing
// observer.disconnect();






  var logoTimes = 0;
  var logoIntervalfunc = function() {
  	logoTimes = logoTimes + 1;

$('.product__adress').find('img[src="/images/company/sport2000_small.png"]').hide();

    if (logoTimes > 7){
    	clearInterval(myLogoInterval);
    }
    
  }
  
  var myLogoInterval = setInterval(logoIntervalfunc, 1000);