Some or more people use html() method to get element's text like the <p>text</p>
and to get this $('p').html()
or $('p').text()
.
And obviously I know there is huge difference between html method and text method. But I would like to know more on this context, what's the better to use?
Some one might say text method is better than html method, please explain why?