Change the Link and Text of "new item" in SharePoint list


How to change the Link and Text of "new item" in SharePoint list



Open site in SharePoint Designer, redirect to the list AllItem View Page and add the script under <PlaceHolderMain> tag.

Code-
<script type="text/javascript">
 $(document).ready(function(){
$("span:contains('new item')").text('New Entry');
$(".ms-heroCommandLink").attr('href','http://srs:port/site/SitePages/NewsAndEvents.aspx');
$(".ms-heroCommandLink").removeAttr("onclick");
 });
 </script>




Comments

Popular posts from this blog

Customizing SharePoint list and implementing Quick search using jQuery

Clear DataTable on button click

Enable and Disable Client side People Picker using jQuery