items.sort( function(a, b){
if( $( a ).find(".CategoryTreeLabelNs14").length === 0 && $(a).find(".CategoryTreeLabelNs3762").length === 0 && $(a).find(".CategoryTreeLabelNs3752").length === 0 && $(a).find(".CategoryTreeLabelNs3756").length === 0 ){ return 0; }
// Get text of the category link
// If nothing is found, status will remain same
if( firstMatch === null && secondMatch === null ) {
if ( firstText.includes("Faculty Champion:") ){ // Now campare with second element if( secondText.includes("School:") || secondText.includes("Priorities:") ){ return -1; } else { return 0; } } else if( firstText.includes("School:") ){ // Now campare with second element if( secondText.includes("Faculty Champion:") ){ return 1; } else if( secondText.includes("Priorities:") ){ return -1; } else { return 0; } } else if( firstText.includes("Priorities:") ){ // Now campare with second element if( secondText.includes("Faculty Champion:") ){ return 1; } else if( secondText.includes("School:") ){ return -1; } else { return 0; } } else { return 0; }
}