GochiSiyan

container gradient

May 10th, 2021 (edited)
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. add_action('wp_footer', function () {
  2. ?>
  3. <script>
  4. document.addEventListener("DOMContentLoaded", function () {
  5. (function(){
  6. document.querySelectorAll('.epic_related_post_container .thumbnail-container>img').forEach(function(value){
  7. var container = document.createElement('div');
  8. container.classList.add('jeg_thumbnail_cover');
  9. container.style.width = '100%';
  10. container.style.height = '100%';
  11. container.style.position = 'absolute';
  12. container.style.background = 'linear-gradient(353deg, rgba(0, 0, 0, 0.57), transparent)';
  13. value.after(container);
  14. });
  15. })()
  16. });
  17. </script>
  18. <?php
  19. }, 99999);
Add Comment
Please, Sign In to add comment