JQuery: html () returns an empty string
2 answers
Try $( 'p' ).html() , not $( '<p>' ).html()
Example http://jsfiddle.net/tdg7U/
Warnings Test1 $( '<p>' ).html()
Warnings Test2 $( 'p' ).html()
+2
").html() in the viewport, I will get an empty string. I assume $("
") no..."> Try Example http://jsfiddle.net/tdg7U/ Warnings Test1 Warnings Test2 Geek Answers HandbookJQuery: html () returns an empty string
2 answers$( 'p' ).html() , not $( '<p>' ).html()$( '<p>' ).html()$( 'p' ).html()source share+2
All Articles