OK rememebr how I wanted an IMAGE to go in and out according to a word? I don't know what I was thinking but I was wrong. I wanted TEXT to go in and out.
Now what's the problem? Everything is the way I want it except for ONE thing... is it possible to be able to update the DIV HTML in a way that it FADES during the transition? Maybe using jQuery?
Here is what I have so far:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta name="author" content="Dan Jasnowski" />
<title>Untitled 2</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
$(function() {
$('#textfield').keyup(function () {
switch($(this).val()) {
case 'dan':
$('#dan').html("<b>Dan is the name!</b>");
break;
case 'apple':
$('#dan').html("<b>Apples are good!</b>");
break;
}
});
});
</script>
</head>
<body>
<input type="text" name="dan" id="textfield" />
<div id="dan">Lorem impulse dolor...</div>
</body>
</html>