PDA

View Full Version : [DHTML] Fuzzy Text



Trinithis
06-16-2007, 07:34 AM
1) CODE TITLE: Fuzzy Text

2) AUTHOR NAME: Trinithis

3) DESCRIPTION: Makes text fuzzy and blurred

4) URL TO CODE: http://trinithis.awardspace.com/fuzzyText/fuzzyText.js

5) URL TO DEMO: http://trinithis.awardspace.com/fuzzyText/fuzzyText.html



Just place the following in your page to blur your text:


<span><span>
Text and other markup here
</span></span><script type="text/javascript">fuzzyText(0)</script>


fuzzyText(0) blurs it in the vertical direction.
fuzzyText(1) blurs it in the horizontal direction.

Works best without enormous font.

Important Note: Due to an IE issue of rendering it correctly when an image is placed within the span containers, if you want the script to work properly, add this right when your BODY tag begins (so the glich works upon it instead of your actual blurred text and image):


<span style="display:none"><span>
<img src="someRandomImageHere.jpg" alt="" />
</span></span><script type="text/javascript">fuzzyText(0)</script>

Twey
06-16-2007, 02:59 PM
c = o.getElementsByTagName("*")[0];Might be better to use o.firstChild and o.firstChild.nextSibling until you get an element, I hear some browsers have problems with getElementsByTagName("*").

jscheuer1
06-16-2007, 05:26 PM
This whole things seems rather pointless except as an exercise in coding (which can be important in itself). For one thing, most people prefer to be able to read the text, making it fuzzy isn't of much use. And, if there were some overriding need for it, simple markup and css can achieve it without the need for javascript.

Oh, and wasn't his show cancelled?

Trinithis
06-16-2007, 06:39 PM
Farscape ran for four seasons and got canceled. Then they made a miniseries to finish the show. Scorpie is the coolest villain evar!