Подстрока не работает в jquery.
1. Мне нужно создать список, как показано ниже ли в цикле for
$('#lstAPIs').append("<li id='" + list[i].Uuid + "'>" + "<div>" + eventIcon + "</div><div style='float:left;'><h4 title=" + list[i].UserIdentity + ">" + list[i].UserIdentity.substring(0, 15) + "..." + "</h4><hr style='width:100%;border:1px dotted silver;'/><h5>" + list[i].TransactionName.substring(0, 23) + "..." + "</h5></div></div>" + ' </li>');
Если я дам sbustring или substr
я получаю следующую ошибку, не могли бы вы предложить, как это исправить.
Uncaught TypeError: Cannot read property 'substring' of undefined
Моя версия jquery - это версия 3.1.1
Что я уже пробовал:
$('#lstAPIs').append("<li id='" + list[i].Uuid + "'>" + "<div>" + eventIcon + "</div><div style='float:left;'><h4 title=" + list[i].UserIdentity + ">" + list[i].UserIdentity.substring(0, 15) + "..." + "</h4><hr style='width:100%;border:1px dotted silver;'/><h5>" + list[i].TransactionName.substring(0, 23) + "..." + "</h5></div></div>" + ' </li>');
для этого получаем следующую ошибку
"
Uncaught TypeError: Cannot read property 'substring' of undefined"