code review

correction after review: use the temporary variable instead of recalculating the JQuery node
This commit is contained in:
Nicolas B 2019-07-31 12:31:36 +02:00 committed by GitHub
parent ec8be09abe
commit fdaefab7cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,7 +3,7 @@
function replaceGroup() {
$('li[data-inputosaurus][title*=","]').each(function (index, elem) {
var $elem = $(elem)
var title = $(elem).attr('title')
var title = $elem.attr('title')
var cut = title.indexOf('<')
title = title.substr(cut + 1, title.length - cut - 2)
$elem.parents('ul').find('.ui-autocomplete-input').val(title)