jqBootstrapValidation icon indicating copy to clipboard operation
jqBootstrapValidation copied to clipboard

dynamic elements support

Open devmondo opened this issue 12 years ago • 1 comments

hi, great library, but it is not working when elements are created dynamically, like when using konckout.js foeach to create lists

i have tried this and still not working

    $("input,select,textarea").not("[type=submit]").live().jqBootstrapValidation();

thanks in advanced.

devmondo avatar Feb 13 '13 06:02 devmondo

i have figured out the cause, but i have no idea why, anytime i apply knockout databinding, jqBootstrapValidation stops working for no reason, wither the items are dynamic or already in DOM, for example

<form class="foaarm-horizontal" style="display:none" >
    <div data-bind=" with:SelectedLessonPreAssessment">
    <div class="control-group">
        <label class="control-label">Email address</label>
        <div class="controls">
            <input type="email">
            <p class="help-block"></p>
        </div>
    </div>
    <div class="form-actions"><button type="submit" class="btn btn-primary">Test Validation <i class="icon-ok icon-white"></i></button></div>
    </div>
</form>

thanks in advanced.

devmondo avatar Feb 13 '13 06:02 devmondo