This repository was archived by the owner on Nov 21, 2024. It is now read-only.
This repository was archived by the owner on Nov 21, 2024. It is now read-only.
onpage function-call triggers twice #42
Open
Description
Using the following code triggers the onpage function-call twice when clicking a pagination link (workaround is included):
var page = 1; // global variable
$('.sbpagination').bootpag({
total: Math.ceil(numPosts / 50),
maxVisible: 3,
firstLastUse: true,
}).on("page", function(event, p){
// @xxx: bug in bootpag? - small workaround in order to avoid double requests and refresh-timeouts
if(page == p){
return;
}
page = p;
refreshShoutbox(((p-1)*50), 50); // $.post() is called inside this function which updates the content
});
Metadata
Metadata
Assignees
Labels
No labels