Sandbox: JavaScript

Highlights an element on load using Fx.Tween's .highlight element method.

Example

Hit refresh to see the highlight again.

I highlight when the page loads.
<div class="box" data-behavior="Highlight">
  I highlight when the page loads.
</div>

Behavior Options

These options apply only to the data- tag invocation.

Name type default description
fxOptions object { duration: 1000 } Options object passed to Fx.Tween (see docs below).
start string '#ffff88' The color the highlight starts at.
end string 'transparent' The color the highlight ends at.

Related Documentation

Note: Not all links in these work.

Document not found.
Document not found.