php - How can I separate words in td with an html tag? -


how can use jquery separate multiple words in td html tag such <br/>?

for example, <td>hello bye</td> become <td>hello <br/> bye</td>.

this work if html in td's not contain tags.

$("td").each(function(){     this.innerhtml = this.innerhtml.replace(/ +/g,"<br/>"); }); 

Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -