0
+Super Simple Javascript Paging System
0
+-------------------------------------
0
+#### by **Thomas Aylott** aka *oblivious at subtleGradient.com*
0
+First, include all your html on the page. Give each paged element a classname of `page1`, `page2`, etc... as many as there are. Then add the classnames `subtlePager` `page1` and `pages10` to the parent element. You can have unlimited pagers per page. See the `subtlePager.demo.html` file for a working demo.
0
+ * **[required]** Parent element
0
+ EG: `subtlePager pages5 page1`
0
+ This classname is required by the default CSS
0
+ `#` is the maximum number of pages, EG: `pages5` for a total of 5 pages
0
+ `#` is the default page to display. I recommend just using `page1` here
0
+ * **[required]** Child elements
0
+ `#` is the page number that you want this element to be visible on.
0
+ * **[required]** Trigger element(s)
0
+ * **[optional]** `onclick`
0
+ * `subtlePager.page(elementId)`
0
+ * `subtlePager.page(elementId, true)`
0
+ * `subtlePager.page(elementId, 5)`
0
+ * **[optional]** Define your custom *"CSS Static Logic"*
0
+ * **[optional]** Redefine defaults
0
+You'll need to attach the functions to your trigger elements somehow, the simplest method is to just use an `onclick` attribute. But I highly recommend you use an eventListener somehow. I leave that as an exercise for the reader.
0
+### Triggering Functions
0
+`subtlePager.page(elementId)`
0
+Goes to the previous page
0
+`subtlePager.page(elementId, true)`
0
+`subtlePager.page(elementId, 5)`
0
+Copyright (c) 2008 Thomas Aylott
0
+Permission is hereby granted, free of charge, to any person obtaining a copy
0
+of this software and associated documentation files (the "Software"), to deal
0
+in the Software without restriction, including without limitation the rights
0
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
0
+copies of the Software, and to permit persons to whom the Software is
0
+furnished to do so, subject to the following conditions:
0
+The above copyright notice and this permission notice shall be included in
0
+all copies or substantial portions of the Software.
0
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
0
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
0
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
0
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
0
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
Comments
No one has commented yet.