Solved

jQuery: Modify what is displayed at bottom of browser when you hover over link

Posted on 2013-06-26
3
376 Views
Last Modified: 2013-06-27
When you hover over a link, the browser shows the URL of that link at the bottom (usually at the bottom-left).  Using jQuery, how can this be modified for matching links?

$('#xyz a').each(function () {
 $(this).attr('href','xyz');
 $(this).attr('???','Hello world'); 
 // Should say "Hello World" at the bottom of the browser when you hover over the link
});

Open in new window

0
Comment
Question by:hankknight
  • 2
3 Comments
 
LVL 42

Expert Comment

by:David S.
ID: 39279987
The "window.status" property can be used to control that, however, many browsers have an option to disable that.
0
 
LVL 16

Author Comment

by:hankknight
ID: 39280017
How can I use jQuery with the "window.status" property so that it only applies to matching links?
$('p a').each(function () {
 $(this).attr('href','xyz');
 $(this).attr('window.status','Hello world'); 
});

Open in new window

0
 
LVL 42

Accepted Solution

by:
David S. earned 500 total points
ID: 39280043
After all these years you still don't know what "window" is?

Try this:
$('p a').each(function () {
  $(this).attr('href','xyz').hover(function(){
    window.status='Hello world';
  }, function(){
    window.status='';
  });
});

Open in new window

0

Featured Post

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are a couple ways to attach a JavaScript function to dynamically created elements. You can make a new script for each element as it’s created or you can use delegation. Delegation allows a single script that is added at page creation to mat…
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question