bootpag - Not working Basic Example

Viewed 8835

I am trying to use a plugin for dynamic pagination.

The plugin is-

Bootpag - Dynamic Pagination

In the Home page of the plugin, I found an example, and I tried to use that as an example and what I have done is like this-

<html>
<head>
    <script src="//code.jquery.com/jquery-2.1.3.min.js"></script>
    <script src="//netdna.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
    <script src="//raw.github.com/botmonster/jquery-bootpag/master/lib/jquery.bootpag.min.js"></script>
    <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
</head>
<body>
    <div id="content">Dynamic Content goes here</div>
    <div id="page-selection">Pagination goes here</div>
    <script>
        // init bootpag
        $('#page-selection').bootpag({
            total: 10
        }).on("page", function(event, /* page number here */ num){
             $("#content").html(num); // Changing div content to dynamic content
        });
    </script>
</body>
</html>

But it is not working.

Can anyone please help?

Thanks in advance for helping.

1 Answers
Related