Как вариант...
//
function test(a, n) {
const c = a.join(' ')
if ($(c).length <= n) return
const o = $('#id-1 .more')
o.append( 'еще' );
o.click(function () {
$(с).addClass('active');
o.text( "" );
})
}
test(['#id-1', '1-item'], 6)
test(['#id-2', '2-item'], 5)