Skip to content

Instantly share code, notes, and snippets.

@IgorGavrilenko
Created December 11, 2020 12:40
Show Gist options
  • Save IgorGavrilenko/b4d7ed33d548ef4ef59a4ad85ea59ea4 to your computer and use it in GitHub Desktop.
Save IgorGavrilenko/b4d7ed33d548ef4ef59a4ad85ea59ea4 to your computer and use it in GitHub Desktop.
// uOrderInitInit
$(uOrderInitInit);
function uOrderInitInit(){
var $filterOutput = $('.filter-output');
var $uOrder = $('.table-u-order__hint');
var $uOrderEl = '.table-u-order__hint';
var $uOrderParent = 'td';
var $uOrderParentClass = 'table-u-order';
if ($uOrder.length) {
$uOrder.parent($uOrderParent).addClass($uOrderParentClass);
}
$filterOutput.on("DOMNodeInserted", function (event) {
$(event.target).find($uOrderEl).parent($uOrderParent).addClass($uOrderParentClass);
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment