As of known Wordpress 5.2.0, login_headertitle
has been deprecated and it is suggested to use login_headertext
instead. However, I like to display a text when the login image is hovered on the login page. For this reason, I want to add the title attribute to the #login h1
tag which is surrounding the login image on the login page. Then I want to add value to this title attribute. I tried something like this, but it didn't work:
$(document).ready(function() {
$('#login h1').attr("title", "Our true mentor in life is science.");
});
How do we add the title attribute to the #login h1
tag and does it work?
Edited after first comment: When I look the Console, it gives an error like this: ReferenceError: $ is not defined.
But on the below, we see that jQuery is defined as follows: <script type='text/javascript' src='***/wp-includes/js/jquery/jquery.js?ver=1.12.4-wp'></ script>
However, even though the jQuery is attached to the page, the problem is solved when I make a definition like this: <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
Why do I need to add jQuery again even though it is attached on the login page?