Created
August 27, 2024 10:45
-
-
Save iamrealfarhanbd/203f9ad045706dee24b99e4b5aaeb691 to your computer and use it in GitHub Desktop.
You can add the below code into your table custom js field to hide/show column for dropdown checkbox near the search field.
This file contains hidden or 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
/* | |
:::::::::::::::::::::: | |
:: hide/show columns:: | |
:::::::::::::::::::::: | |
*/ | |
jQuery('.dropdown-menu-right input').on('change',function(e){ | |
e.preventDefault(); | |
jQuery('.dropdown-menu-right input').each(function(e){ | |
console.log(jQuery(this).is(":checked")); | |
if(!jQuery(this).is(":checked")){ | |
jQuery('.ninja_column_'+e).hide() | |
}else{ | |
jQuery('.ninja_column_'+e).show() | |
} | |
}); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment