"Page" Event.
"Page" Event.
lingg
Posts: 3Questions: 0Answers: 0
Good day, everyone!
Please help me with "Page" event. I need to apply Bootstrap popovers on some elements in table, after elements are rendered. But after event fired jQuery selector of that elements = 0. So I think it fired before page rendered? and Why it works only with "Next" "Prev" buttons but not digits of pagination.
Thanks,
Mike
[code]
$('#manager').on('page', function(){
console.log('TRIGGER');
console.log($('.trigger').length);
bindPopovers();
}).dataTable({
"iDisplayLength": 1,
"sDom": "<'row'f<'progress-tb left'><'span6 right'<'dt_actions'>l>r>t<'row'<'span6'i><'span6 right'p>>",
"sPaginationType": "bootstrap_alt",
"aaData" : data,
"aaSorting": [[ 4, "asc" ]],
"aoColumns": [
{ "sTitle": "Status", "sClass": 'sensor-status-icon', 'sWidth': '60px'},
{ "sTitle": "Alert", "sClass": 'sensor-alert-icon', 'sWidth': '60px'},
{ "sTitle": "Sensor ID" , "sClass": 'pseudo-link', 'sWidth': '70px'},
{ "sTitle": "Area" },
{ "sTitle": "Equipment" },
{ "sTitle": "Sensor", "sClass": 'pseudo-link'},
{ "sTitle": "Actions", "sClass": 'actions-manager', 'sWidth': '100px', 'bSortable': false, },
],
"oLanguage": {
"sLengthMenu": "_MENU_ records per page"
},
"bAutoWidth": true,
});
[/code]
Please help me with "Page" event. I need to apply Bootstrap popovers on some elements in table, after elements are rendered. But after event fired jQuery selector of that elements = 0. So I think it fired before page rendered? and Why it works only with "Next" "Prev" buttons but not digits of pagination.
Thanks,
Mike
[code]
$('#manager').on('page', function(){
console.log('TRIGGER');
console.log($('.trigger').length);
bindPopovers();
}).dataTable({
"iDisplayLength": 1,
"sDom": "<'row'f<'progress-tb left'><'span6 right'<'dt_actions'>l>r>t<'row'<'span6'i><'span6 right'p>>",
"sPaginationType": "bootstrap_alt",
"aaData" : data,
"aaSorting": [[ 4, "asc" ]],
"aoColumns": [
{ "sTitle": "Status", "sClass": 'sensor-status-icon', 'sWidth': '60px'},
{ "sTitle": "Alert", "sClass": 'sensor-alert-icon', 'sWidth': '60px'},
{ "sTitle": "Sensor ID" , "sClass": 'pseudo-link', 'sWidth': '70px'},
{ "sTitle": "Area" },
{ "sTitle": "Equipment" },
{ "sTitle": "Sensor", "sClass": 'pseudo-link'},
{ "sTitle": "Actions", "sClass": 'actions-manager', 'sWidth': '100px', 'bSortable': false, },
],
"oLanguage": {
"sLengthMenu": "_MENU_ records per page"
},
"bAutoWidth": true,
});
[/code]
This discussion has been closed.
Replies
Allan
p.s. I suppose "Page" shoud fire when you click digits pagination buttons! cheers.
Allan