Datatable action only working on first page of table
Datatable action only working on first page of table
noureddine123
Posts: 3Questions: 0Answers: 0
I am using data table (bootstrap) and have a problem when I am goin to the second page. If I click on edit than there is no action. On the first page everything is working fine.
For two days I am trying to fixs this problem, but without any results. I am new to jQuery and Javascript.
Does anyone sees what is wrong with my code?
My html code is:
[code]
Test Table
Test table, with test data.
Rendering engine
Browser
Platform(s)
Engine version
CSS grade
Actions
Trident
Internet
Explorer 4.0
Win 95+
4
X
Trident
Internet
Explorer 5.0
Win 95+
5
C
Trident
Internet
Explorer 5.5
Win 95+
5.5
A
Gecko
Camino 1.5
OSX.3+
1.8
A
Gecko
Netscape 7.2
Win 95+ / Mac OS 8.6-9.2
1.7
A
Gecko
Netscape Browser 8
Win 98SE+
1.7
A
Presto
Opera 9.0
Win 95+ / OSX.3+
-
A
Presto
Opera 9.2
Win 88+ / OSX.3+
-
A
Presto
Opera 9.5
Win 88+ / OSX.3+
-
A
Presto
Opera for Wii
Wii
-
A
Presto
Nokia N800
N800
-
A
<!-- table-responsive -->
[/code]
For two days I am trying to fixs this problem, but without any results. I am new to jQuery and Javascript.
Does anyone sees what is wrong with my code?
My html code is:
[code]
Test Table
Test table, with test data.
Rendering engine
Browser
Platform(s)
Engine version
CSS grade
Actions
Trident
Internet
Explorer 4.0
Win 95+
4
X
Trident
Internet
Explorer 5.0
Win 95+
5
C
Trident
Internet
Explorer 5.5
Win 95+
5.5
A
Gecko
Camino 1.5
OSX.3+
1.8
A
Gecko
Netscape 7.2
Win 95+ / Mac OS 8.6-9.2
1.7
A
Gecko
Netscape Browser 8
Win 98SE+
1.7
A
Presto
Opera 9.0
Win 95+ / OSX.3+
-
A
Presto
Opera 9.2
Win 88+ / OSX.3+
-
A
Presto
Opera 9.5
Win 88+ / OSX.3+
-
A
Presto
Opera for Wii
Wii
-
A
Presto
Nokia N800
N800
-
A
<!-- table-responsive -->
[/code]
This discussion has been closed.
Replies
[code]
jQuery(document).ready(function() {
jQuery('#table2').dataTable({
"sPaginationType": "full_numbers",
"fnDrawCallback": function(){
console.log("fnDrawCallback");
}
});
// Chosen Select
jQuery("select").chosen({
'min-width': '100px',
'white-space': 'nowrap',
disable_search_threshold: 10
});
// Delete row in a table
jQuery('.delete-row').click(function(){
var c = confirm("Continue delete?");
if(c)
jQuery(this).closest('tr').fadeOut(function(){
jQuery(this).remove();
});
return false;
});
// Show aciton upon row hover
jQuery('.table-hidaction tbody tr').hover(function(){
jQuery(this).find('.table-action-hide a').animate({opacity: 1});
},function(){
jQuery(this).find('.table-action-hide a').animate({opacity: 0});
});
});
[/code]
Allan