jQuery Split text() to get new lines -


how split .text() , should new lines.

for suppose have this.

var loa = $('.loa_div').text(); alert(loa); 

alert loa gives me,

resultabc.resultdefgh.resultkijklm.result12.result888.kkkresult.123result. 

i should get

resultabc.     resultdefgh. resultkijklm. result12. result888. kkkresult. 123result. 

var str= "resultabc.resultdefgh.resultkijklm.result12.result888"; var stresult=str.split('.').join('\n'); 

demo:

http://jsfiddle.net/dp49y/2/


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -