Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

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

Open
pranayteja2773 opened this issue Sep 25, 2019 · 0 comments
Open

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

pranayteja2773 opened this issue Sep 25, 2019 · 0 comments

Comments

@pranayteja2773
Copy link

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);

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant