77
| <![CDATA[<script type="text/javascript">
$( document ).ready( function () {
$( '#example' ).dataTable( {
"ordering": false,
dom: 'Bfrtip',
"ajax": {
"url": "include/processo-listar-noticias.php"
},
"columnDefs": [ {
"targets": [ 0 ],
"visible": false,
"searchable": false
} ]
} );
var list = $(".list li");
var numToShow = 10;
var button = $("#next");
var numInList = list.length;
list.hide();
if (numInList > numToShow) {
button.show();
}
list.slice(0, numToShow).show();
button.click(function(){
var showing = list.filter(':visible').length;
list.slice(showing - 1, showing + numToShow).fadeIn();
var nowShowing = list.filter(':visible').length;
if (nowShowing >= numInList) {
button.hide();
}
});
var list2 = $(".list2 li");
var numToShow2 = 4;
var button2 = $("#next2");
var numInList2 = list2.length;
list2.hide();
if (numInList2 > numToShow2) {
button2.show();
}
list2.slice(0, numToShow2).show();
button2.click(function(){
var showing = list2.filter(':visible').length;
list2.slice(showing - 1, showing + numToShow2).fadeIn();
var nowShowing = list2.filter(':visible').length;
if (nowShowing >= numInList2) {
button2.hide();
}
});
} );
</script>]]>
|