I want to add button to all web parts of my home page instead of add new item link and I've no idea how to create it For additional information I am using share point 2013.

  • what exactly is the goal here? you want to keep functionality of the add item link, or you want to place something else entirely? what should the new button do? Commented Jul 20, 2014 at 8:09
  • The main goal is add item link by an image button for example but I want to show this button in header of my web part, beside of my web part name
    – Milad
    Commented Jul 20, 2014 at 8:36

1 Answer 1


this is a very rough example but I think you get the idea

  • locate the add new item(s)
  • for each one of them, replace the link by an image (or anything else)
  • move the element from the bottom to a parent element
<!-- change add new item markup for all webparts in page and move them around -->
<script type="text/javascript" src="../Style Library/jquery-2.1.1.min.js"></script>
<style type="text/css">
/*hide the second button - I dont want edit*/
.ms-list-addnew a + a{display:none;}
.customAddLink{position:absolute; right:0;}
<script type="text/javascript">
    $('.ms-list-addnew > a').each(function(){
        //alert('found a list webpart!');
        //remove the texts
        $(this).parent().contents().filter(function(){ return this.nodeType != 1; }).remove();
        //place an input button inside the anchor
        $(this).html('').prepend('<input type="button" value="click me" />');
        //move the whole anchor near the webpart title


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.