Tuesday, October 27, 2015

BreadCrumb in SharePoint

<script>
$(document).ready(function (){

 var _welcomemenu =  $("a[title='Open Menu']")
        .clone()    //clone the element
        .children() //select all the children
        .remove()   //remove all the children
        .end()  //again go back to selected element
        .text();    //get the text of element
      var _newwelcomemenu = _welcomemenu.split(',')[1]  +" " + _welcomemenu.split(',')[0]; //swipe first and last name

       $("a[title='Open Menu']").text( "Welcome " + _newwelcomemenu); // Add friendly text

});
</script>

No comments:

Post a Comment