In response to clicking the "ALL" checkbox, I need to change multiple checkboxes. The changes include changing the class, checked state and some hidden fields. Instead of changing each attribute individually in javascript, to ensure consistency, I am returning the partial views of all affected checkboxes. My goal is to parse the returned string in javascript and place each div in the appropriate location using JQuery's .html() method. The returned string looks as follows
"<div id="checkbox-7" class="simple"><form action="toggle" ...></form></div>
<div id="checkbox-8" class="simple"><form action="toggle" ...></form></div>
...
<div id="checkbox-all" class="simple"><form action="toggle" ...></form></div>"
How can I extract each div from this string using Javascript/ jQuery?