Skip to content

Instantly share code, notes, and snippets.

@yasinatesim
Last active July 17, 2021 06:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yasinatesim/b573bf7cf2dcbfb92df73c23e7364c0a to your computer and use it in GitHub Desktop.
Save yasinatesim/b573bf7cf2dcbfb92df73c23e7364c0a to your computer and use it in GitHub Desktop.
jQuery Title Değiştirme - jQuery Title Change
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script>
$(function() {
// Get page title
var pageTitle = $("title").text();
// Change page title on blur
$(window).blur(function() {
$("title").text("Don't forget to read this...");
});
// Change page title back on focus
$(window).focus(function() {
$("title").text(pageTitle);
});
});
</script>
</body>
</html>
console.log('Beril');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment