Home > Work > Useful JavaScript Function: Hide Side Panel / Quick Launch – v4.master

Useful JavaScript Function: Hide Side Panel / Quick Launch – v4.master

On dashboard pages I often find I need more space.  A quick way to do this is to place this into a Content Editor Web Part.

1 <script type='text/javascript'> 2 3 function v4MasterHideSidePanel() { 4 $('#s4-mainarea').children().eq(0).hide(); 5 $('#s4-mainarea').children().eq(1).css('margin-left', '0'); 6 } 7 8 $(document).ready(function(){ 9 v4MasterHideSidePanel(); 10 }); 11 12 </script>

This will hide the Side Panel / Quick Launch area on the v4.master – Master Page (Default Master Page for non-publishing sites)

NB: This method relies on JQuery

Advertisements
Categories: Work Tags: ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: