Search code examples
javascriptjquerysharepointsharepoint-2010sharepoint-2013

How to move 'add document' to the top of the library?


I want to move the 'add document' button to the top. For Reference https://i.sstatic.net/7c5dq.jpg Please Advise.


Solution

  • Add the code below into a content editor web part in list view page to achieve it.

    <script src="https://code.jquery.com/jquery-1.12.4.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    $(document).ready(function() {
        $("#idHomePageNewDocument").closest("table").after($(".ms-listviewtable"));
    });
    </script>
    

    enter image description here