Source

progressive-btns /

Filename Size Date modified Message
lib
test
10 B
932 B
2.6 KB
2.0 KB

Usage

Include scripts and styles:

<link href="bootstrap.min.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="bootstrap.min.js"></script>
<script type="text/javascript" src="jquery.progressive-btns.js"></script>

Write some form markup:

<form method="get">
    <p>
        Pre-selected options should be selected when the
        buttons are initialized (ie, they should have an
        active class applied).
    </p>
    <select name="fancy-buttons" class="prog-btns">
        <option value="A">A</option>
        <option value="B" selected="selected">B</option>
        <option value="C">C</option>
    </select>
    <input type="submit"/>
</form>

Then activate the plugin:

$(document).ready(function(){
    $('.prog-btns').progbtns();
});