jquery-archive / jquery-mobile

jQuery Mobile Framework
https://jquerymobile.com
Other
9.7k stars 2.41k forks source link

Radio get unchecked when using html() function in jquery #8655

Open pranayteja2773 opened 4 years ago

pranayteja2773 commented 4 years ago

I have a DIV element, which contains a radio element. when i try to set this DIV to another element, radio button gets unchecked.

when i try like this, radio getting unchecked. $(".printdiv").html($(".printable").html());

when I try this it is working fine. var strHtml = document.getElementsByClassName('printable').innerHTML; $(".printdiv").html(strHtml);