Posted By

1man on 02/13/09


Tagged

node replace text remove links


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

umang_nine
delikassap


Remove text from a node (e.g in links)


 / Published in: jQuery
 

Removed a certain word from a list of links (purely for design reasons). Link length way to long with the link included.

  1. /**
  2. * Remove some text dynamically from the Nav (for design)
  3. */
  4. $("ul#aPorts li a").not(":last").each(function(){
  5. var alteredString = $(this).text().replace(/Airport/,"");
  6. $(this).text(alteredString);
  7. });

Report this snippet  

You need to login to post a comment.