/** * Ara's JavaScript Library: DOM */ var ARA = window.ARA || {}; ARA.dom = ARA.dom || {}; /** * spanify receives a DOM node reference (or an ID to one), iterates over all of * it's child nodes and wraps each character of the text nodes that it * encounters with a span. By default only first level text nodes are * processed. It can deep scan however and process all child text nodes. * It returns nothing as it directly modifies the DOM. * * @param {String/Object} el An element ID or element reference in the DOM * @param {Bool} deep (Optional), default is false. * If true, all child nodes will be spanified. * If false, then only first level text nodes * will be spanified. */ ARA.dom.spanify = function(el, deep){ el = ARA.dom.getElement(el); deep = !!deep; /* // spanify all child text nodes of el for(var i=0; i