diff --git a/assets/archivedfilter.publish.js b/assets/archivedfilter.publish.js index 3c3f05b..73b55de 100644 --- a/assets/archivedfilter.publish.js +++ b/assets/archivedfilter.publish.js @@ -14,20 +14,19 @@ // Initial function: instantiates extension after verifying that the archive field exists function initHide() { - table.find('thead th').each(function(index) { + $('table').find('thead th').each(function(index) { + var column = $(this); var title = $.trim(column.text()).toLowerCase(); - // Check name of field to see if it's an archive field. // If your field happens to be named something different than 'Archived' or 'Archive', this is where you add it - if (title == 'archived' || title == 'archive') { + if (title == 'archived' || title == 'archive' || title == 'Archive') { colindex = index+1; - - var btn = $(''); - $('#contents h2').append($(btn)); + var btn = $('