Hi folks,
I just tried something I should have before I emailed the list. I tried
this code in Fire Fox.
Here's the new information I got from doing that:
1. The problem with the text looking bad after applying the fade effect
doesn't occur in FF. (stoopid IE :o( )
2. I can basically achieve the effect I want doing the following:
function Foo(IsChecked){
if(IsChecked){
$("#MySpanLabel").empty().append("New Text").fadeIn(300);
}
else{
$("#MySpanLabel").empty().append("Original Text").fadeIn(300);
}
}
Does anyone know what can be done in IE to overcome the bungled text
look?
Thanks,
Chris
Christopher Jordan wrote:
Hi folks,
I've got a span tag that contains the label for a section of my screen.
When the user clicks a checkbox, I'd like that text to fadeOut, change
to some different text, and then fadeIn again. Part of my problem is
that the text gets changed prior to the fade. The second part of my
problem is that once I apply the fade effect to the tag the text inside
the tag is messed up. The font isn't right. In fact, it doesn't look
like any font at all. It's just thicker and clunkier lookin', almost
like it's pixelated.
Here's my code:
function Foo(IsChecked){
if(IsChecked){
// my first thought was this... but it didn't really work
//$("#MySpanLabel").fadeOut("normal").empty().append("The
Changed Text").fadeIn("normal");
// my second thought was to break apart the pieces instead of
chaining them...
$("#MySpanLabel").fadeOut("normal");
$("#MySpanLabel").hide();
$("#MySpanLabel").empty().append("The
Changed Text"); // I dunno why I decided to chain these and not the
others.
$("#MySpanLabel").fadeIn("normal");
}
else{
// the point of this is to show the same effect, but the text
changes back to the original text
$("#MySpanLabel").fadeOut("slow").empty().append("Original
Text").fadeIn("slow");
}
}
<input type="checkbox" style="vertical-align:middle;"
>
<span id="MySpanLabel" class="MyClass">Original Text</span>
|
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/