code_junkie

CSS to increase size of first word

Nov 10th, 2011
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. <div id="content">
  2. <p><strong>First Word</strong> rest of paragraph.</p>
  3. </div>
  4.  
  5. #content p strong
  6. {
  7. font-size: 14pt;
  8. }
  9.  
  10. $('#links a').each(function(){
  11. var me = $(this);
  12. me.html( me.text().replace(/(^w+)/,'<strong>$1</strong>') );
  13. });
  14.  
  15. $('#links a').each(function(){
  16. var me = $(this)
  17. , t = me.text().split(' ');
  18. me.html( '<strong>'+t.shift()+'</strong> '+t.join(' ') );
  19. });
Add Comment
Please, Sign In to add comment