A Pen By Yukulélé

Pen Settings

↑ Insert the most common viewport meta tag

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource
via CSS Lint

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource
via JS Hint

Code Indentation


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Want a Run Button?

If active, the preview will update automatically when you change code.


              <h2>jQuery wordify</h2>
<p><a href="https://gist.github.com/yukulele/8668962">https://gist.github.com/yukulele/8668962</a></p>
<div class="test">
  Lorem ipsum dolor sit amet, consectetur adipisicing.
    <li>Lorem "ipsum" dolor sit amet.</li>
    <li>Similique <span>minus corporis</span> earum consequatur!</li>
    <li>Nam veniam perspiciatis. Reprehenderit vero.</li>
    Lorem ipsum dolor sit amet
  <p>Lorem ipsum dolor sit amet, <em>consectetur adipisicing elit</em>. Fuga dicta error<strong> quae nihil itaque repudiandae in dolorum voluptatibus a amet pariatur ipsam distinctio sint obcaecati </strong>accusantium facere possimus impedit nulla!</p>
  <p lang="fr">Aujourd'hui j'ai mangé du kiwi</p>
  <p lang="js">ちゃ姚氯詧と 餥禚ばレ禞 ほ䩎グェぷリェ きちゅま だ脩, せ饥よつ檧 ト榩ゝれチャ</p>


  border:1px solid green;
  display: inline-block;
  margin:2px 0;
  border: 1px solid #000; 
  background: #444;
  color: #fff;
  //text-decoration: underline;
  border-radius: 3px;


  var test = $('.test');

$.fn.wordify = function(){
	textNodes = this.find(":not(iframe,textarea)").addBack().contents().filter(function() {
		return this.nodeType === 3;
  /** jquery.wordify.js;
   ** https://gist.github.com/yukulele/8668962
	textNodes.each(function() {
		var $this = $(this);
		var text = $this.text();
		console.log('in  :'+text);
		text = text.replace(/([^\s-.,;:!?()[\]{}<>"]+)/g,'<span class="word">$1</span>');
		console.log('out :'+text);
	return this;
Loading ..................