mirror of
https://github.com/Mottie/tablesorter.git
synced 2025-01-12 15:24:21 +00:00
Pager: plugin again updates output display on init
This commit is contained in:
parent
2d81e3e8f3
commit
aabb1d6dad
@ -132,7 +132,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
updatePageDisplay = function(table, p, completed) {
|
updatePageDisplay = function(table, p, completed) {
|
||||||
if ( !p.initialized || completed !== true ) { return; }
|
if ( !p.initialized ) { return; }
|
||||||
var i, pg, s, $out, regex,
|
var i, pg, s, $out, regex,
|
||||||
c = table.config,
|
c = table.config,
|
||||||
f = c.$table.hasClass('hasFilters'),
|
f = c.$table.hasClass('hasFilters'),
|
||||||
@ -950,6 +950,7 @@
|
|||||||
// pager initialized
|
// pager initialized
|
||||||
if (!p.ajax) {
|
if (!p.ajax) {
|
||||||
p.initialized = true;
|
p.initialized = true;
|
||||||
|
updatePageDisplay(table, p, true);
|
||||||
$(table).trigger('pagerInitialized', p);
|
$(table).trigger('pagerInitialized', p);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -184,6 +184,13 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
});</script>
|
});</script>
|
||||||
|
<script>
|
||||||
|
$(function(){
|
||||||
|
$('.clear').click(function(){
|
||||||
|
$('#display').html( new Array(6).join('<li> </li>') );
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body id="pager-demo">
|
<body id="pager-demo">
|
||||||
<div id="banner">
|
<div id="banner">
|
||||||
@ -205,11 +212,13 @@
|
|||||||
</ul>
|
</ul>
|
||||||
<p>
|
<p>
|
||||||
|
|
||||||
<h1>Triggered Events</h1>
|
<h1>Triggered Events <button class="clear">Clear</button></h1>
|
||||||
<ul id="display">
|
<ul id="display">
|
||||||
<li>Pager events will appear here.</li>
|
<li>Pager events will appear here.</li>
|
||||||
<li> </li>
|
<li> </li>
|
||||||
<li> </li>
|
<li> </li>
|
||||||
|
<li> </li>
|
||||||
|
<li> </li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h1>Demo</h1>
|
<h1>Demo</h1>
|
||||||
|
Loading…
Reference in New Issue
Block a user