Add span tag to first word in title | Adobe Business Catalyst

<script>
$('#content h1').each(function(){
   var me = $(this)
      , t = me.text().split(' ');
   me.html( '<span>'+t.shift()+'</span> '+t.join(' ') );
 });
</script>

No comments:

Post a Comment