I have some divs on my page that are made both resizable and draggable using jQuery UI. When I call html() on those divs, I get not only the content of the div, but also some extra content inserted by jQuery UI when I made them resizable:
<div class="ui-resizable-handle ui-resizable-e"></div>
<div class="ui-resizable-handle ui-resizable-s"></div>
<div class="ui-resizable-handle ui-resizable-se ui-icon ui-icon-gripsmall-diagonal-se" style="z-index: 1001; "></div>
text() works for retrieving the current text, but when I try to set the content using $("selector").text("new text"), it replaces the jQuery UI code, making the div not resizable anymore.
How can I just get/set the text, not the jQuery UI resizable code?
You could try to make another div within that div which holds the content and has 100% width and height, then make the parent div resizable.