From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Birgit Pauli-Haack
Subject: Re: [jQuery] [Newbie] dynamic text loads...
Now I have another question: how to I get the original text back into
the
<div id="boxtext">
Boxtext.
</div>
after I unhover from the particular link?
Birgit
-----
Sorry Birgit I've been busy this week and am just now catching up on
email.
Take a look at the API docs for the .hover() function. You can pass it
two functions, one for over and one for out. In the first function
rather then replacing the text within the box you want to hide it, then
in the second function you simply show it again. Something like...
$("[EMAIL PROTECTED]").hover(
function () {
$("#boxtext").wrap("<div class='og-boxtext'
style='display:none'></div>");
$("#boxtext").append("<div class='new-boxtext'>" +
texts[this.id] + "</div>");
},
function () {
$("div.new-boxtext").remove();
ogText = $("#boxtext div.og-boxtext").html();
$("#boxtext div.og-boxtext").remove();
$("#boxtext").html(ogText);
}
);
Again, UNTESTED, but should be a decent start.
-ALEX
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/