Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

javascript modal close

$('#closemodal').click(function() {
    $('#modalwindow').modal('hide');
});
Comment

close bootstrap modal with javascript

$('#myModal').modal('hide');
Comment

modal dismiss

<!-- Button trigger modal -->
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModalCenter">
  Launch demo modal
</button>

<!-- Modal -->
<div class="modal fade" id="exampleModalCenter" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
  <div class="modal-dialog modal-dialog-centered" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLongTitle">Modal title</h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">×</span>
        </button>
      </div>
      <div class="modal-body">
        ...
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary">Save changes</button>
      </div>
    </div>
  </div>
</div>
Comment

when modal close event

$("yourid").on('hide.bs.modal', function(){
	// do it here
});
Comment

bs modal service close

this._bsModalRef.hide();
Comment

bootstrap modal on close

$('#myModal').on('hidden.bs.modal', function () {
    // do something…
});
Comment

slear modal form after close

<div id="app">
  <child-component ref="childComponent"></child-component>
  <button @click="click">Click</button>  
</div>
Comment

slear modal form after close

var ChildComponent = {
  template: '<div>{{value}}</div>',
  data: function () {
    return {
      value: 0
    };
  },
  methods: {
    setValue: function(value) {
        this.value = value;
    }
  }
}

new Vue({
  el: '#app',
  components: {
    'child-component': ChildComponent
  },
  methods: {
    click: function() {
        this.$refs.childComponent.setValue(2.0);
    }
  }
})
Comment

Close Modal

 .close.mat-button {
    position: absolute;
    top: 0;
    right: 0;
    padding: 5px;
    line-height: 14px;
    min-width: auto;
}
   <button class="close" mat-button [mat-dialog-close]="true">X</button>

Comment

PREVIOUS NEXT
Code Example
Javascript :: jquery select input with class 
Javascript :: n javascript 
Javascript :: chartjs lineTension 
Javascript :: javascript reduce fraction 
Javascript :: how to find length of a assocative array vuejs 
Javascript :: how to generate random id in javascript 
Javascript :: copy array javascript 
Javascript :: ajax request in javascript 
Javascript :: convert days into year month 
Javascript :: javascript random 4 digit number 
Javascript :: toggle checkbox jquery 
Javascript :: js select by data attribute 
Javascript :: scrapy javascript 
Javascript :: sequelize where more than 
Javascript :: reverse int js 
Javascript :: npm react dom routing 
Javascript :: how to add data to file json in python 
Javascript :: prevent blur event on click 
Javascript :: ionic capacitor keyboard push content up 
Javascript :: append child at the top 
Javascript :: xlsx to json javascript 
Javascript :: javascript break for loop 
Javascript :: typeorm findone subquery 
Javascript :: unity get json value 
Javascript :: every method javascript 
Javascript :: get params from route vuejs 
Javascript :: Reverse a String With Built-In Functions 
Javascript :: how to create an array in node js 
Javascript :: unity javascript 
Javascript :: set node_env 
ADD CONTENT
Topic
Content
Source link
Name
1+6 =