I'm trying to disable a bootstrap modal.
I need it to start by default on the disabled page, not calling the modal bootstrap, then be activated when selecting an option.
Well, I've tried some alternatives that did not work out.
First I tried to do with the function unbind();
$('.disabled-link').unbind();
The idea was to try to take the function of the click of the link, it did not work, as the modal continues to appear.
Another alternative I thought was to take the data-target="termsContract" and then replace it with attr
$("#dtTarget").attr('target', '#termosContrato');
Follow my div code that calls modal
<div class="row">
<div class="col-md-6">
<div class="form-group">
<div class="md-checkbox-list has-feedback" id="divTermosContrato">
<div class="md-checkbox">
<input type="checkbox" id="chkTermosContrato" name="chkTermosContrato" value="1" class="md-check" disabled="disabled">
<label for="chkTermosContrato">
<span></span>
<span class="check"></span>
<span class="box"></span> <a data-toggle="modal" data-target="#termosContrato" id="dtTarget" class="disabled-link">Aceito os termos</a> </label>
</div>
</div>
<span class="erroTermos help-block"> </span>
</div>
</div>
</div
Thanks in advance for the help.