modal poupop bootstrap

1

I'm using a modal of bootstrap .

I call the modal after clicking on a onclick , this modal is on a page the thing happens is that the close button does not do anything to me.

var btAbrir = $("#btAbrir");
var myModal = $("#myModal");

function load(id){
  //$("#contentLoading").load("../temp/tst.php?id="+id +""); 
  myModal.modal('show');
}

function close(){ 
  myModal.modal('hide');
};

btAbrir.on("click", function () {
  load(0);
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script><scriptsrc="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet"/>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel">Modal title</h4>
      </div>
      <div class="modal-body">
        ...
      </div>
      <div class="modal-footer">
        <button type="button" onclick="close()" class="btn btn-default" data-dismiss="modal">Close</button>
      </div>
    </div>
  </div>
</div>
<button id="btAbrir" type="button" class="btn btn-default">Abrir Modal</button>
    
asked by anonymous 20.08.2015 / 15:43

0 answers