Bootstrap pagination
Could you give more information on what the point of this is? All it does is change the class of the links. What about the actual pagination itself, which i assume would use AJAX? This code should probably know about that in order to react to errors.



Wrapping the code in an object like this isn't very useful like this. For one, the functions inside the containing object all refer to its variable name, so it breaks if it's changed. Also it looks like a reusable class allowing to have multiple paginations in one HTML document, however it's not.



You have the "max size" redundantly hard coded twice - once in the JavaScript and once as the number of elements in the HTML. How do you know that the pagination has exactly 6 pages?

The same basic problem with the original "current" element and the "active" class: It's hard coded in both the JS and the HTML. With the class name it even looks as if you could change it, because it's an initialization parameter, but changing it breaks the design, because its hard coded in the HTML.



Generally you have some unnecessarily abbreviated variable names, cn being the worst.