Have you ever wanted to link a SharePoint Web Part Title to another web page?
Here is the code to get web part title and then add image or text or link in web part title and right align that.
To get this working, you need put this code into Script Editor Web Part or, place the script into a .js file and link to it from your Master Page.
// Function to add link/text/icon in right side of the web part title $(document).ready(function () { var className='.ms-webpart-titleText'; $(".ms-webpart-chrome-title span h2").each(function(inx){ var webPartTitle = $(this).text(); //Check web part title if(webPartTitle.indexOf("My Web Part Title")>=0) { var openUrl ="javascript:OpenPopUpPageWithTitle(\""+_spPageContextInfo.siteServerRelativeUrl+"/Style Library/MyFolder/MyPage.aspx?IsDlg=1\", RefreshPage, null, null, \"My Page Title\"); return false;"; $(this).prepend("<div class='small' title='Click to open my page' style='cursor: pointer; display: inline-block; float:right; text-align:center'><span id='spanMore' title='My Page' class='glyphicon glyphicon-th-list' aria-hidden='true' onclick='"+openUrl+"'>*****</span> </div>") ; } }); });