Created
September 13, 2010 04:16
-
-
Save 0xnbk/576796 to your computer and use it in GitHub Desktop.
Remove a word in a text
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var el = $('#id'); | |
el.html(el.html().replace(/word/ig, "")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Remove a word in a text
Do you ever wanted to be able to remove words in a text? Note that the following code can be easily modified to replace a word by another.