Guest User

Untitled

a guest
Jul 18th, 2024
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. document.addEventListener("DOMContentLoaded", function() {
  2. // Select the parent container
  3. var container = document.querySelector(".tdb_single_content");
  4.  
  5. // Check if the parent container exists
  6. if (container) {
  7. // Check if the child with the class 'tds_locker' exists within the parent container
  8. var lockerContent = container.querySelector(".tds_locker");
  9.  
  10. // If the child with 'tds_locker' does not exist, add the 'display: block' style to the div with class 'tds-locked-content'
  11. if (!lockerContent) {
  12. var lockedContent = document.querySelector(".tds-locked-content");
  13.  
  14. if (lockedContent) {
  15. lockedContent.style.display = "block";
  16. }
  17. }
  18. }
  19. });
  20.  
Advertisement
Add Comment
Please, Sign In to add comment