JSFiddle - React, Tailwind, and code Playground

by chovy

JavaScript

//add overlay for initial thumbnails  
  (function(){
    var overlay = $('<img class="overlay" src="/a/i/prototype/book-overlay.png" style="display: none;" />');
    $(".course .cover, #other .cover").append( overlay );
    $(".cover .thumb").load(function(){
      var item = $(this).parents(".cover");

      $C.log.add("WIDTH:"+$(this).width());
      $C.log.add("HEIGHT:"+$(this).height());

      item.css({
        width: $(this).width()+"px",
        height: $(this).height()+"px",
      });
      item.find(".overlay").show();
    });

  })();