How to disable a link that is calling a modal bootstrap?

0

I'm trying to make a <a href> do not call a modal from Bootstrap .

<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" disabled="disabled" tabindex="-1" class="disabled-link">Aceito os termos</a> </label>

        </div>
      </div>
      <span class="erroTermos help-block"> </span>
    </div>
  </div>
  </div

This code calls a modal, how to disable it so that it does not call modal when loading the page?

    
asked by anonymous 07.08.2017 / 20:11

1 answer

0

What happens is that the anchor element - <a /> - does not have the disabled attribute, but the <button /> element has this attribute.

So, just change the element:

<a data-toggle="modal" data-target="#termosContrato" disabled="disabled" tabindex="-1" class="disabled-link">Aceito os termos</a>

By:

 <button data-toggle="modal" data-target="#termosContrato" disabled="disabled" tabindex="-1" class="disabled-link">Aceito os termos</button>
    
08.08.2017 / 21:16