Данный:
jQuery("input[id$=-purchaser-name]").
filter("[id*=-edit-]").
somefunction();
Как я могу найти строку первого селектора от somefunction()?
Вы можете использовать свойство устаревших selector
:
$.fn.somefunction = function () {
console.log(this.end().selector);
return this;
};
jQuery("input[id$=-purchaser-name]").filter("[id*=-edit-]").somefunction();