home / experts / javascript / column69 |
|
The Main FunctionThe main function of the tool ischangeFilter(). We call it every time the user selects another filter. We first find out the currently-selected filter:
We then assign the background and text color of the filtered image:
We then verify that the filter is not empty:
And only then comes the main loop in which we check which filter it is and act accordingly. Once we identify a filter, we perform two actions. First, we copy the
where
Notice we emptied the background parameter to emphasize the filter effect on a non-backgrounded text. Consult the appended listing for the full Next: How to assemble the HTML code for a filter |
Produced by Yehuda Shiran and Tomer Shiran
All Rights Reserved. Legal Notices.
Created: September 25, 2000
Revised: September 25, 2000
URL: http://www.webreference.com/js/column69/4.html