How it's done
This effect is achieved by adding a javascript in the <head> section of your theme.
The script is as follows:
<!-- Text inactive tab -->
<script>jQuery(document).ready(function( $ ){
// Get page title
var pageTitle = $("title").text();
// Change page title on blur
$(window).blur(function() {
$("title").text("Come back!");
});
// Change page title back on focus
$(window).focus(function() {
$("title").text(pageTitle);
});
});
</script>
You can copy the entire code and paste it as is in the <head> section.
Next: How to edit the text
Join the Discussion
Write something…