My HTML code is constructed in such a way that it is in following format :
var s = $('<input type="date" id="date-value"/>');
I want to extract the html inside my jQuery selection, as a separate element:
<input type="date" id="date-value"/>
I tried various inbuilt methods like s.text()
, s.innerHTML
etc, but they didn't work.
JSFiddle : http://jsfiddle.net/fkgaqtb2/