I would like to take all my <div>‘s in a parent <div> and re-render the contents into a new broswer window. Can anyone make any suggestions? I’m using jQuery and .NET.
-
Get all divs in the markup.
var markupData = $("#names").html(); -
Empty div.
$("#names").empty(); -
open new window displaying markupData.
???
How about:
Using
window.open. Keep a reference to the window you just created and set its HTML.Example: http://jsfiddle.net/A72TH/
If you wanted to append a stylesheet containing CSS rules for the blank page, you could write something like this: