jquery - popout class
by ajinkyax
HTML
<article>
<h3>Hello World!! 111</h3>
<p>HTML5 will be the new standard for HTML.</p>
<p><span class="myclass">JAVASCRIPT IS COOL</span>The previous version of HTML, HTML 4.01, came in 1999. The web has changed a lot since then.</p>
<p>HTML5 is still a work in progress. However, the major browsers support many of the new HTML5 elements and APIs.</p>
</article>
JavaScript
var popout = $('span.myclass').each(function(){
var $this = $(this);
$('<h5></h5>', {
text: $this.text(),
class: 'someclass'
}).prependTo($this.closest('p'));
});