Skip to content

Instantly share code, notes, and snippets.

@nocodesupplyco
Created December 19, 2022 16:46
Show Gist options
  • Save nocodesupplyco/dcbc9135cf32dab725983af5d5bae3fb to your computer and use it in GitHub Desktop.
Save nocodesupplyco/dcbc9135cf32dab725983af5d5bae3fb to your computer and use it in GitHub Desktop.
Update Page Title When Navigating Away
$(function () {
var pageTitle = $("title").text();
$(window).blur(function () {
$("title").text("Hey, come back");
});
$(window).focus(function () {
$("title").text(pageTitle);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment