Paginate Button not returning parent
Paginate Button not returning parent
I'm having a hard time with this issue, I try to call the pagination parent using
[code]
Column Header 1
Column Header 2
Column Header 3
Column Header 4
Column Header 5
Column Header 6
Column Header 7
Column Header 8
Row 1
Row 1
Row 1
Row 1
Row 1
Row 1
Row 1
Row 1
Row 2
Row 2
Row 2
Row 2
Row 2
Row 2
Row 2
Row 2
Row 3
Row 3
Row 3
Row 3
Row 3
Row 3
Row 3
Row 3
[/code]
[code]
$('.data-table table').dataTable({
"sPaginationType": "full_numbers",
"sDom": '<"top"fl>rt<"bottom"p><"clear">'
});
$('.dataTables_paginate a, .dataTables_paginate span a, .dataTables_paginate span, a.paginate_button, span a.paginate_button, .dataTables_paginate span a.paginate_button').live('click', function(e){
console.log($(this).parent());
var target = $(this).parents('.data-table').attr('id');
$('#'+target).focus();
});
[/code]
It's returning the value when the first, next, previous, and last button clicked, but not for the number button.
I'm going to use the parent to get the focus when the page change since the data tables not focusing itself.
[code]
Column Header 1
Column Header 2
Column Header 3
Column Header 4
Column Header 5
Column Header 6
Column Header 7
Column Header 8
Row 1
Row 1
Row 1
Row 1
Row 1
Row 1
Row 1
Row 1
Row 2
Row 2
Row 2
Row 2
Row 2
Row 2
Row 2
Row 2
Row 3
Row 3
Row 3
Row 3
Row 3
Row 3
Row 3
Row 3
[/code]
[code]
$('.data-table table').dataTable({
"sPaginationType": "full_numbers",
"sDom": '<"top"fl>rt<"bottom"p><"clear">'
});
$('.dataTables_paginate a, .dataTables_paginate span a, .dataTables_paginate span, a.paginate_button, span a.paginate_button, .dataTables_paginate span a.paginate_button').live('click', function(e){
console.log($(this).parent());
var target = $(this).parents('.data-table').attr('id');
$('#'+target).focus();
});
[/code]
It's returning the value when the first, next, previous, and last button clicked, but not for the number button.
I'm going to use the parent to get the focus when the page change since the data tables not focusing itself.
This discussion has been closed.