|
|
|
This is first of three different 'ripple text' effects coded in Javascript.
Sample 1 = Random change the display of characters in a text string
Sample 2 = Sequential change display of characters in a text string - colour and case
Sample 3 = Change display of characters in a text string - progressive colour change
This is sample 1: 'Random Text'
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<SCRIPT LANGUAGE="JavaScript">
<!--
function open () {return true;}
//-->
</SCRIPT>
<title>Ripple Text Examples by Mark Boyle email mboil@hotmail.com</title>
</head>
<BODY bgcolor=green text="white" bgcolor="green" link="yellow" vlink="yellow"
alink="red">
<font color="yellow">
<SCRIPT LANGUAGE="JavaScript">
var speed = 20;
var fulltext;
if(navigator.appName == "Netscape")
document.write('<layer id="wds"></layer><br>');
if (navigator.appVersion.indexOf("MSIE") != -1)
document.write('<span id="wds"></span><br>');
function livetext()
{
fulltext="this is an example of random effect text"
var whichchar=Math.round((Math.random()*fulltext.length))
switch(whichchar){
case 0:
fulltext = '<font color="red">' + fulltext.substring(0,1) + '</font>' + fulltext.substring
(1,fulltext.length);
break;
case fulltext.length:
fulltext = fulltext.substring(0,fulltext.length-1) + '<font color="red">' + fulltext.substring
(fulltext.length-1,fulltext.length) + '</font>';
break;
default:
fulltext =
fulltext.substring(0,whichchar) + '<font color="violet">' +
fulltext.substring(whichchar,whichchar+1) + '</font>' +
fulltext.substring(whichchar+1,fulltext.length);
break;
}
if(navigator.appName == "Netscape") {
size = "<font point-size='25pt'>";
document.wds.document.write(size+'<center>' + fulltext + '</center></font>');
document.wds.document.close();
}
if (navigator.appVersion.indexOf("MSIE") != -1){
wds.innerHTML = '<center>' + fulltext + '</center><p>';
wds.style.fontSize='25px'
}
setTimeout("livetext()",speed);
}
livetext()
</script>
</font>
</BODY>
</html> |
|
| Balance values between two list boxes. Change the value of list box A acording to the value in list box B and vice versa using Javasvript. Categories : Java Script, Form Processing | | | A Simple sign up script with PHP and JavaScript validations. Categories : PHP, Java Script, MySQL, Databases | | | Protect your mailto: email addresses from bots Categories : PHP, Email, Java Script | | | Create HTML forms dynamicly using Javascript & PHP Categories : PHP, PHP Classes, Java Script | | | AJAX XML HTTP Request - Compatible with almost browsers! Categories : AJAX, HTTP, Java Script | | | Array values from javascript to php Categories : PHP, Java Script, Arrays | | | Tree Menu Dynamic (+Static) with Loading in Progress.. Categories : PHP, Java Script, HTML and PHP | | | OverEasy - PHP generated JavaScript to do mouseovers on
your pages. Modify one file and one function does it all
for you! Categories : PHP, Java Script, HTML and PHP, MySQL | | | Javascript linked dropdowns Categories : Java Script, HTML, Classes and Objects | | | Javascript animated menu items Categories : DHTML, CSS, Java Script, HTML | | | Remote Scripting: send form POST data to a script and insert the results into a page without refreshing the page. Categories : PHP, AJAX, HTML and PHP, Java Script | | | Bouncing Marquee at Status Bar Categories : Java Script, HTML, Browsers | | | PHP Array to Javascript Object Categories : PHP, Arrays, Java Script | | | How to create <SELECT> menues that change on the fly according to other <SELECT> menues on the page? Categories : Java Script, HTML | | | JavaScript dropdown list menu to switch any page. Categories : Java Script, Beginner Guides, Form Processing | |
|
|