I have a div containing text and an unordered list. I was to clear the text from the div without affecting the ul. $('#mydiv').text() returns just the text string, while $ ('#mydiv').text('') successfully clears the text but also removes the html.
How can I remove just the text? Thanks