Git Product home page Git Product logo

jquery-dynamic-numbered-lists's Introduction

Version 1.0 GitHub issues jQuery 1.6.4

jQuery Dynamic Numbered Lists

This plugin turns a series of ordered lists into a single contiguous stream. For example, if you have several sets of ordered lists on your page containing a coherent set of data, but they are separated by content (e.g. sections of data with descriptions between), you have two options: 1) you can specify the starting number for each individual ordered list after the first and keep it up to date as you add/remove items; or 2) you can use this plugin to target all the lists at once and never worry about it again!

Usage Instructions

Create your lists using standard <ol> tags. If you plan to have more than one group of dynamically numbered lists, give them discreet classes.

Example:
<ol class="dynum">
    <li>Item #1</li>
    <li>Item #2</li>
    <li>Item #3</li>
    <li>Item #4</li>
    <li>Item #5</li>
</ol>
Some content here...
<ol class="dynum">
    <li>Item #6</li>
    <li>Item #7</li>
    <li>Item #8</li>
    <li>Item #9</li>
    <li>Item #10</li>
</ol>
Some content here...
<ol class="dynum">
    <li>Item #11</li>
    <li>Item #12</li>
    <li>Item #13</li>
    <li>Item #14</li>
    <li>Item #15</li>
</ol>
Some content here...
<ol class="dynum">
    <li>Item #16</li>
    <li>Item #17</li>
    <li>Item #18</li>
    <li>Item #19</li>
    <li>Item #20</li>
</ol>
...

Next, simply initialize the dynamic numbered lists by calling the plugin. This will add dynamically renumber all the lists after the first based on how many items have occurred thus far.

$('ol.dynum').dynumlist();

Demo

The demo shows the lists above both with and without the dynamic numbering.

Change Log

Version 1.0 (2011/10/22); Initial release All plugin functionality included

jquery-dynamic-numbered-lists's People

Contributors

chimericdream avatar

Stargazers

 avatar

Watchers

 avatar James Cloos avatar  avatar

jquery-dynamic-numbered-lists's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.