/ 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.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/** * Remove some text dynamically from the Nav (for design) */ $("ul#aPorts li a").not(":last").each(function(){ var alteredString = $(this).text().replace(/Airport/,""); $(this).text(alteredString); });