Click here to Skip to main content
15,891,704 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i add div to new document but it not added css. it only added start to body tag.


What I have tried:

<script>

function nWin() {
  var w = window.open();
 
  var html = $(".drag-right").html();
 
    $(w.document.body).html(html);
	
	$(w.document.body).addClass('html-content');
	
	//$(w.document.body).prepend('<link rel="stylesheet" href="css/style2.css" type="text/css" />');

	
}


    $(".live").click(nWin);



</script>
Posted
Comments
Bryian Tan 4-Jul-19 11:41am    
What the code trying to open? this might be useful javascript - window.open Style using css - Stack Overflow[^]
Maciej Los 11-Jul-19 17:03pm    
Sounds like an answer.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900