Copied!
It's on your clipboard.
You’ve been offline for 0 second. Please check your Internet connection.

Help Us Improve

Found an issue or have an idea? Let us know.
Select all that apply...
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Change Page Title When User Switches Tabs
Preview
Download Template
Report Bug
Overview

This script changes the tab title when a user switches away. It briefly replaces the original title with a custom message after a short delay, syncs it across open tabs, and restores the original title once the user returns.

Documentation
Need Help? Email Us
Setup: External Scripts
Language
Copy
Step 0: Copy structure to Elementor
Copy To Elementor
Step 0: Add HTML
Language
Copy
Step 0: Add custom CSS
Language
Copy
Step 0: Add custom Javascript
Language
Copy
(function () {
  const originalTitle = document.title;
  const awayMessage = "👀 Miss me?";

  function handleVisibility() {
    document.title = document.hidden ? awayMessage : originalTitle;
  }

  document.addEventListener("visibilitychange", handleVisibility);
})();
Step 5: Add custom Javascript
Language
Copy
(function () {
  const originalTitle = document.title;
  const awayMessage = "👀 Miss me?";

  function handleVisibility() {
    document.title = document.hidden ? awayMessage : originalTitle;
  }

  document.addEventListener("visibilitychange", handleVisibility);
})();
Step 5: Implementation
Publish and preview live
Some solutions only work on the live site. Always publish and test after each change, as results may not appear in the editor.
Resorce Details
Resource
Basics
Category
Gimmicks
Add-ons
No items found.
Last Updated
October 25, 2025
Original Source
Watch Toturail