mdbootstrap / bootstrap-templates

A collection of free Bootstrap 5 templates.
https://mdbootstrap.com/freebies/
3.07k stars 1.02k forks source link

add tagClass to <div> not to <span> #615

Closed engHusseinMansour closed 2 years ago

engHusseinMansour commented 6 years ago

HTML Code

    <div class="form-group">
        <label for="phone_number">
            Phone Number
        </label>
        <input id="phone_number" class="form-control">
    </div>

Javascript Code

 $('#phone_number').tagsinput({
            tagClass: 'form-control'
        });

Inspect element

    <div class="form-group">
        <label for="tbx_phone_number">
            Phone Number
        </label>
        <div class="bootstrap-tagsinput">
            <span class="tag form-control">
                test
                <span data-role="remove">
                </span>
            </span>
            <input placeholder="" size="1" type="text">
        </div>
    </div>

I want to add form-control class to <div> not to <span> ?

igordeoliveirasa commented 5 years ago

Me too!