Created
December 21, 2021 10:04
-
-
Save reachkamrul/34cbcd4ca2cf67d1eb3d178ab031dddc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To hide before filter | |
//css | |
#footable_parent_NT_ID{ | |
opacity:0; | |
} | |
// js | |
$table.on("after.ft.filtering", function () { | |
jQuery(".ninja-custom-filter").each(function(){ | |
var m = jQuery(this).find(':input option:selected'); | |
if(!m.val()){ | |
jQuery(this).parents('table:not(.ninja_has_filter)').find('tbody').remove(); | |
jQuery(this).parents('table:not(.ninja_has_filter)').find('tfoot').remove(); | |
jQuery(this).parents('table:not(.ninja_has_filter)').find('.footable-header').remove(); | |
jQuery(this).parents('table:not(.ninja_has_filter)').find('.ninja_table_buttons-header').remove(); | |
jQuery(this).parents('table').removeClass('ninja_has_filter'); | |
jQuery('thead .no-data').remove(); | |
jQuery(this).parents('table').find('thead').append('<tr class="no-data"><th colspan="100%"> No data found </th></tr>'); | |
} | |
jQuery('.footable_parent').attr('style', 'opacity: 1 !important') | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment