I have a page which can behave as a pop up in sharepoint..Now I can using this javascript to identify if it is a pop up if (window.location.search.match("[?&]IsDlg=1")) but what I am not able to figure out is how do I insert some css based on if this condition is true.
One way I am thinking is to have a label in the page and then use code behind to identify the condition and insert the css but I also want to check whether this is possible though javascript.Can someone please guide me .
I think I can do something with jQuery like this
$('<style type="text/css">#foo { background: #000; } </style>').appendTo("head");
Thanks