I have a page which can be opened as a pop up page in sharepoint .Now when the page is opened as pop up I want some css to be modified.What is happening is that the code is able to successfully modify the label element but unable to modify the .ms-dlgTitle which is the window sharepoint opens which holds the page and is above the iFrame element holding the page.Can someone please tell me what I can do here.
<script src="/_layouts/1033/jQuery.js" type="text/javascript">
</script>
<script type="text/javascript">
$(document).ready(function ()
{if (window.location.search.match("[?&]IsDlg=1"))
{
alert("doc is ready now");
$('<style type="text/css">.ms-dlgTitle{ width: 200px; } #foo{background:black; }</style>').appendTo("head");}});
function t(){ var options = SP.UI.$create_DialogOptions();options.url = "http://sharepointhost:2266";options.height = 300;SP.UI.ModalDialog.showModalDialog(options);
}
</script>
<a class="s" onclick="javascript:t()">k</a> <label title="label1" id="foo">lbl</label>
.ms-dlgTitleText? In your code, you are applying CSS to.ms-dlgTitle, but doing nothing to.ms-dlgTitleText. – Whitelaw Dec 6 '12 at 0:05