Skip to content

Instantly share code, notes, and snippets.

@annuman97
Created June 25, 2025 09:47
Show Gist options
  • Save annuman97/edf5a5a70379aef0f962395b95d930e5 to your computer and use it in GitHub Desktop.
Save annuman97/edf5a5a70379aef0f962395b95d930e5 to your computer and use it in GitHub Desktop.
If a column contains URLs and users want to enable redirection to that link when clicking anywhere on the row,
function runAll(){
$('.footable tbody tr').click( function() {
}).hover( function() {
$(this).toggleClass('hover');
$(this).css('cursor', 'pointer');
});
$(document).on('click', '.footable tbody tr', function(e){
e.preventDefault();
var url = $(this).find('a').attr('href');
window.open(url, '_blank');
});
}
runAll();
$table.on('after.ft.paging', function () {
runAll();
});
$table.on("after.ft.filtering", function () {
runAll();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment