Matt - the hover method takes two functions as arguments -- the first executes
on mouseover, the second on mouseout -- so you need to add a second function:
$(document).ready(function() {
$("#main #welcome a").hover(
function() {
var href = $(this).attr('href');
var a1 = href.split("DURL=");
if (a1 != href) {
window.status = a1[1];
}
},
function() { // do something else here! }
);
});
-- Josh
----- Original Message -----
From: Matt Quackenbush
To: [email protected]
Sent: Tuesday, December 11, 2007 1:20 PM
Subject: [jQuery] Alter Status Message
Hello,
I have a redirect page, but would like to change the status bar message to
show only the target link, rather than the full URL. So, links that hit the
redirect page are formed like so:
http://mydomain.com/redirect.cfm?DURL=http://www.realtarget.com/realpage.htm
What I want to actually show in the status bar is:
http://www.realtarget.com/realpage.htm
I was confident that I could easily handle such a task by throwing together a
quick little jQuery-powered script, and here's what I came up with:
$(document).ready(function() {
$("#main #welcome a").hover(
function() {
var href = $(this).attr('href');
var a1 = href.split("DURL=");
if (a1 != href) {
window.status = a1[1];
}
}
);
});
On mouseover, the status bar display is not affected. On mouseout, FireBug
reports the following error message:
g has no properties
handleHover(mouseout clientX=0, clientY=0 )jquery-packed.js (line 1)
e( mouseout clientX=0, clientY=0)jquery-packed.js (line 1)
e ()jquery-packed.js (line 1)
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a...
Any tips/pointers steering me in the right direction would be most
appreciated. :)
Thanks,
Matt