SiteExperts.com Logo Home | Community | Developer's Paradise | Jobs
User Groups | Site Tools | Site Information | Search

Inside Technique : Steve's Behaviors : type Behavior

The type behavior makes it easy to type the contents of an element character by character. In Internet Explorer 5.0, the paragraph below is typed onto the screen. In all other browser, the paragraph is properly displayed and the behavior is ignored.

This is the TYPE.htc behavior. Type supports two properties: letterDelay, the number of milliseconds between letters, and offStart, the number of milliseconds to wait after the page is loaded to start typing. The typing can be manually started with the typeo() method. The onTypeDone event fires on the element when the typing is complete.

The above paragraph is wrapped in a DIV and is associated with the type behavior as follows:

<div id=tp1 
     style="behavior: url(type.htc); 
            width: 100%; 
            background: lightgreen; 
            border: 1 black solid" 
     offStart=1000 
     letterDelay=5>
<p>...paragraph...
</div>

Page 1:Steve's Behaviors
Page 2:move Behavior
Page 3:fade Behavior
Page 4:bubble Behavior
Page 5:type Behavior
Page 6:switch Behavior
Page 7:over Behavior
Page 8:float Behavior