Strike through function
<p>I'm looking to strike through content on my webpage. Some of the content is text, other is links, ... and <strong>I need a function that can just strike through it</strong>. </p>

<p>Found this great answer: <a href="http://stackoverflow.com/questions/5368521/how-do-i-animate-a-strike-through-effect-using-javascript-on-a-piece-of-text">How do I animate a strike through effect using JavaScript on a piece of text?</a>   (2nd answer)
But I want to transform it into a function, so that I can use it a bit everywhere.</p>

<p>His original jsfiddle: <a href="http://jsfiddle.net/alexdickson/wmBYx/" rel="nofollow">http://jsfiddle.net/alexdickson/wmBYx/</a></p>

<p>Here is his JS:</p>

<pre><code>var findText = function(element, pattern, callback) {

    if ( ! element.childNodes) {
      return;   
    }
    for (var childi = element.childNodes.length; childi-- &gt; 0;) {
        var child = element.childNodes[childi];
        if (child.nodeType == 1) {
            findText(child, pattern, callback);
        } else if (child.nodeType == 3) {
            var matches = [];
            var match;
            while (match = pattern.exec(child.data))
            matches.push(match);
            for (var i = matches.length; i-- &gt; 0;)
            callback.call(window, child, matches[i]);
        }
    }
}


findText(document.body, /./g, function(node, match) {
    var element = document.createElement('span');
    node.splitText(match.index + 1);
    element.appendChild(node.splitText(match.index));
    node.parentNode.insertBefore(element, node.nextSibling);
});

var spans = document.getElementsByTagName('span'),
    spansLength = spans.length,
    currentSpan = 0,
    interval = setInterval(function() {
        if (currentSpan == spansLength) {
            clearInterval(interval);
        }
        spans[currentSpan++].style.textDecoration = 'line-through';

    }, 100); 
</code></pre>

<p>To tell you the truth, I don't understand any of it, so I have no idea how I can transform this into a DRY function. (Won't even show you what I got so far, I'm ashamed).</p>

<p>Thanks for your help</p>

<p>PS: I'm using jquery, so you are more than welcome to add some in it.</p>
