user3079341 user3079341 - 1 year ago 81
jQuery Question

how do i put br in javascript .text

How do i put br inside text i tried putting 'br' but it doesnt work it just display the br literally on screen

Answer Source

I agree with @user3284463 , You try add tag in text , and you want see rendered result! replace $('#win').text() with $('#win').html() eg :

 $('#win').html(winner+' <br /> '+'stars'+'  <br />  '+'earned'+' Completion time'+' '+ counter +' seconds');

see jQuery text
see jQuery html

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download