Q:

add toggle to select: bootstrap

I am trying to add a select input field in twitter bootstrap. I intend to display different fields when each one of these options are selected. I tried it using data-toggle. But i could only succeed that with buttons and not on select field.
<div class="control-group">
                                            <label class="control-label">Payment Mode</label>
                                            <div class="controls">
                                                <select id="payment" class="input-xlarge">
                                                    <option value="" class="input-xlarge">Select your Payment mode</option>
                                                    <option value="1"> <a href="#cash">Cheque Deposit</a></option>
                                                    <option value="2">Online Transaction</option>
                                                    <option value="3">ATM Transfer</option>
                                                    <option value="4">IMPS Transfer</option>
                                                </select>
                                            </div>
                                        </div>

This code for button works fine - 
<button data-toggle="collapse" href="#cash">
Submit 
</button>

Cheers in advance
Shahzad 

A:

Finally got the answer! :)
Just a script did the trick.
Here is how i did it:
<div class="control-group">
<label class="control-label">Payment Mode</label>
<div class="controls">
    <select id="payment" class="input-xlarge">
        <option value="" class="input-xlarge">Select your Payment mode</option>
        <option value="cash">Cash Deposit</option>
        <option value="cheque">Cheque Deposit</option>
        <option value="online">Online Transaction</option>
        <option value="transfer">ATM Transfer</option>
    </select>
</div>

<div class="iscash" >
<div class="control-group">

        <input class="input-xlarge focused" id="focusedInput" type="text">

</div>
<div class="control-group">

        <input class="input-xlarge focused" id="focusedInput" type="text">

</div>

<script>
    $('[class^=is]').hide();

    $("#payment").change(function() {
        var value = $("#payment option:selected").val();
        var theDiv = $(".is" + value);

        theDiv.slideDown();
        theDiv.siblings('[class^=is]').slideUp();
    });
</script>

