creativetimofficial / material-bootstrap-wizard

Material Bootstrap Wizard - Bootstrap wizard based on Material Design
http://demos.creative-tim.com/material-bootstrap-wizard/wizard-book-room.html
MIT License
81 stars 79 forks source link

Dynamically generated radio do not respond to events #42

Open wirekobrobbey27 opened 3 years ago

wirekobrobbey27 commented 3 years ago

I load the radio buttons through an Ajax response, when this done it does not respond to click events. Below is how the radio buttons are generated

Javascript

for (const key in data) {
                if (Object.hasOwnProperty.call(data, key)) {
                    const element = data[key];
                    console.dir(element)
                    var html = "<div class='col-sm-4'><div class='choice' data-toggle='wizard-radio' rel= 'tooltip' title data-original-title='This is good if you travel alone.'><input type='radio' name='operators' value ='" + element.op_code + "'><div class='icon'><i class='material-icons'> airplane_ticket</i></div><h6>" + element.op_name + " </h6></div> </div>";
                    $('#details_content').prepend(html);
                }
            }

HTML

 <div class="tab-pane" id="details">
                                        <h4 class="info-text">Select the Airline Operator</h4>
                                        <div class="row">
                                            <div class="col-sm-10 col-sm-offset-1" id="details_content">

                                            </div>
                                        </div>
                                    </div>