Skip to content
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
@q4z1

Description

@q4z1

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions