modal.js 402 B

12345678910111213141516
  1. // __________MODAL
  2. // showing modal with effect
  3. $('.modal-effect').on('click', function(e) {
  4. e.preventDefault();
  5. var effect = $(this).attr('data-effect');
  6. $('#modaldemo8').addClass(effect);
  7. });
  8. // hide modal with effect
  9. $('#modaldemo8').on('hidden.bs.modal', function(e) {
  10. $(this).removeClass(function(index, className) {
  11. return (className.match(/(^|\s)effect-\S+/g) || []).join(' ');
  12. });
  13. });