I want to get the log-in name of user from people picker control using jquery.
I have a code which displays the display name of the user but I am not able to get the login name.
Code is as follows:
$(document).ready(function () {
$("input[title='Project Owner']").focusout(function () {
var loginName = $("span.ms-entity-resolved").attr("title");
alert("Login Name:" + loginName);
var displayName = $("span.ms-entity-resolved div:first-child").attr("displaytext");
alert("Display Name :" +displayName);
});
});
Here Project Owner is name of the PeoplePicker control.
How do I get the login name?