Pager: plugin again updates output display on init

This commit is contained in:
Mottie 2014-09-20 19:50:27 -05:00
parent 2d81e3e8f3
commit aabb1d6dad
2 changed files with 12 additions and 2 deletions

View File

@ -132,7 +132,7 @@
},
updatePageDisplay = function(table, p, completed) {
if ( !p.initialized || completed !== true ) { return; }
if ( !p.initialized ) { return; }
var i, pg, s, $out, regex,
c = table.config,
f = c.$table.hasClass('hasFilters'),
@ -950,6 +950,7 @@
// pager initialized
if (!p.ajax) {
p.initialized = true;
updatePageDisplay(table, p, true);
$(table).trigger('pagerInitialized', p);
}
});

View File

@ -184,6 +184,13 @@
});
});</script>
<script>
$(function(){
$('.clear').click(function(){
$('#display').html( new Array(6).join('<li>&nbsp;</li>') );
});
});
</script>
</head>
<body id="pager-demo">
<div id="banner">
@ -205,11 +212,13 @@
</ul>
<p>
<h1>Triggered Events</h1>
<h1>Triggered Events &nbsp; <button class="clear">Clear</button></h1>
<ul id="display">
<li>Pager events will appear here.</li>
<li>&nbsp;</li>
<li>&nbsp;</li>
<li>&nbsp;</li>
<li>&nbsp;</li>
</ul>
<h1>Demo</h1>