I am creating html element and putting it in a jQuery object. I'm having trouble getting HTML from that jQuery object I thought I could just use .html () but it gives an empty string.
Ex:
var myImage = $ ("& lt; img src = 'blah.gif' /" ")
;
I have tried that html
I tried $ (myImage) .html ()
& Lt; - Any luck
.html () will bring the element back inside element.
If you are the only image tag capable of ensuring the basic element, you can call .html () on the parent.
The other (ugly) option content must be set as the data on the jquery object (i.e. obj .data (html_string)) and then it's .data ()
Comments
Post a Comment