Skip to content

not working inside a dynamically generated content #10

Description

@yuzrie

Using Bootstrap 4.0, icheck-bootstrap from AdminLTE3

I have a modal that is cloned and triggered on click like so:

$('body').on('click', '.btn-modal-add-resource', function() {
        let modal = $('.resource-modal-template').clone().removeClass('.resource-modal-template')

        modal.modal()
        modal.on('hidden.bs.modal', function (e) { $(this).remove() })
})

and within that modal I have the html code:

<div class="form-group">
    <div class="icheck-primary">
        <input type="radio" id="someRadioId1" name="someGroupName" />
        <label for="someRadioId1">Option 1</label>
    </div>
    <div class="icheck-primary">
        <input type="radio" id="someRadioId2" name="someGroupName" />
        <label for="someRadioId2">Option 2</label>
    </div>
</div>

the radio button cannot be clicked. unless I removed the icheck-primary class and follow the normal radio button from bootstrap - but that'd be without the style.. normally for this kind of issue is about initializing the element from javascript. but this library is fully css

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions