Ir a la navegación
Ir a la búsqueda
Busca en cnbGuatemala con Google
209 bytes eliminados
, hace 7 años
Línea 96: |
Línea 96: |
| for (var tagless in splitContent) { | | for (var tagless in splitContent) { |
| tag.empty(); | | tag.empty(); |
− | splitContent[tagless] = tag.html(splitContent[tagless]).wrap('<p></p>').parent().html(); | + | splitContent[tagless] = tag.html(splitContent[tagless]).wrap('<p></p>').parent().html();}} for (var word in splitContent) { words.push(splitContent[word]); } } return words; }; function _splitWords(text) { |
− | }
| + | return text.split(/\s+/); } |
− | }
| + | function _markupContent(tag, html) { |
− | for (var word in splitContent) {
| |
− | words.push(splitContent[word]);
| |
− | }
| |
− | }
| |
− | return words;
| |
− | };
| |
− | | |
− | /**
| |
− | * Splits words by spaces
| |
− | *
| |
− | * @param string text The text to split
| |
− | */
| |
− | function _splitWords(text) {
| |
− | return text.split(/\s+/); | |
− | }
| |
− | | |
− | /**
| |
− | * Formats html with tags and wrappers.
| |
− | *
| |
− | * @param tag
| |
− | * @param html content wrapped by the tag
| |
− | */
| |
− | function _markupContent(tag, html) {
| |
| // wrap in a temp div so .html() gives us the tags we specify | | // wrap in a temp div so .html() gives us the tags we specify |
| tag = '<div>' + tag; | | tag = '<div>' + tag; |