none
Sharepoint 2013 hidden ribbon RRS feed

  • Question

  • Hi Guys,

    I hope you can help me out with this one. We recently migrated to SharePoint 2013. In the previous version 2010 the ribben was displayed by default. Now you only see the: browse, items, etc.. (depending on the type of list or library.

    For a lot of normal users this is confusing.

    I did some researching and found a article about this subject. It does exactly what i want. See http://netwovenblogs.com/2012/08/01/sharepoint-2013-hidden-ribbon/

    It uses this code:

    EnsureScriptFunc("mquery.js", "m$", function() {

    m$("#onetidDoclibViewTbl0 > tbody > tr").click( function() {

    m$(".ms-cui-ct-first > a").click();

    });

    });

    To instanly make my ribbon visible. The only thing is that i dont know where to put this code. Master page? Or maybe you guys have a better idea on how to achieve this. Thanks in advance!

    Nelis

    Thursday, October 22, 2015 9:46 AM

Answers

  • Hi Nelis,

    The easiest way is to add the code to your master page.

    And here is the code demo for achieving this goal:

    <script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    $(document).ready(function () {
        $("#onetidDoclibViewTbl0 > tbody > tr > td").click( function() { 
    			$(".ms-cui-ct-first > a").click(); 
    	});
    
     })
    </script>
    

    Best regards,

    Victoria


    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    • Marked as answer by Nelis 1983 Monday, October 26, 2015 9:26 AM
    Friday, October 23, 2015 8:11 AM
    Moderator

All replies

  • Hi Nelis,

    The easiest way is to add the code to your master page.

    And here is the code demo for achieving this goal:

    <script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    $(document).ready(function () {
        $("#onetidDoclibViewTbl0 > tbody > tr > td").click( function() { 
    			$(".ms-cui-ct-first > a").click(); 
    	});
    
     })
    </script>
    

    Best regards,

    Victoria


    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    • Marked as answer by Nelis 1983 Monday, October 26, 2015 9:26 AM
    Friday, October 23, 2015 8:11 AM
    Moderator
  • Hi Victoria,

    Thanks for thinking with me. Just one more question. I am a novice user on coding in SharePoint. If i want to add your code to the master page. Between wich lines i need to add it?

    Is it also possible to do it with a webpart? that i add a content editor and make it connectable with a list or library?

    Regards,

    Nelis 



    • Edited by Nelis 1983 Wednesday, October 28, 2015 10:31 AM
    Wednesday, October 28, 2015 10:29 AM