What is the difference between text() and html() in jquery?
Answer / Shyam Babu
Both `text()` and `html()` are used to get or set content within an element, but they differ in how they handle HTML tags. When you use `text()`, it removes any HTML tags within the selected elements and only returns the text content. If you want to set text content while preserving HTML tags, use `html()`. Conversely, when you use `html()` to get content, it returns the complete HTML markup of the matched elements, including their children and any HTML tags.
| Is This Answer Correct ? | 0 Yes | 0 No |
Mention the advantages of cdn? : jQuery Mobile
Can we include multiple version of jquery? : jquery mobile
Explain some benefits of jquery knockout?
Why jQuery is better than JavaScript?
Explain jquery connect?
How to search for descendant elements that match the specified selectors using ?
What is called chaining?
Define the use jquery.data method?
Whether our own specific characters are used in place of $ in jQuery?
How can related code be encapsulated? Give example.
What is the difference between prop and attr?
How to disable/enable an element in jquery?