I will be straight to the point. I created a textarea element and I have to return the tag html plus the text inside.
var elemField = $('<textarea></textarea>');
elemField.val('bla bla this is my textarea text');
//changing some properties
elemField.attr("disabled", "disabled");
elemField.width('95%');
found this solution:
var elemFeldCode = elemField.clone().wrap('<p>').parent().html().toString();
Output:
"<textarea disabled="disabled" style="width: 95%;"></textarea>"
Desired Output:
"<textarea disabled="disabled" style="width: 95%;">bla bla this is my textarea text</textarea>"
Any one can help me to have this result in a cross browser manner throw jquery?!