sometimes we want to hide the option to allow user to log in with different user. We can have our custom master page applied to site and then we would like to place this in the web part in master page in 2010. or if you want that option not be available in certain page, then add content editor web part and use below code to hide it.
<script src="jquery-1.4.2.min.js" type="text/javascript"></script>
<script type="text/JavaScript">
jQuery(document).ready(function($) {
var objects = document.getElementsByTagName("ie:menuitem");
for (var i = 0; i < objects.length; i++) {
itm = objects[i];
if (('#' + itm.id).indexOf("LoginAsDifferentUser") != -1) {
$('#' + itm.id).remove();
}
}
})
</script>
You should be good to go.
<script src="jquery-1.4.2.min.js" type="text/javascript"></script>
<script type="text/JavaScript">
jQuery(document).ready(function($) {
var objects = document.getElementsByTagName("ie:menuitem");
for (var i = 0; i < objects.length; i++) {
itm = objects[i];
if (('#' + itm.id).indexOf("LoginAsDifferentUser") != -1) {
$('#' + itm.id).remove();
}
}
})
</script>
You should be good to go.
No comments:
Post a Comment