Sha256: 3f6160fad30af892933d301efc354d6c9425b77e561caaa89c824a1ec0fbe9e6

Contents?: true

Size: 466 Bytes

Versions: 1

Compression:

Stored size: 466 Bytes

Contents

$(document).ready(function() {
  $('.modal-open').click(function(e) {
    e.preventDefault();
    let model = $(this).data('modal');
    let thisModal = $('.modal.' + model)

    thisModal.addClass('active');
    $('html, body').css('overflow', 'hidden');
  })

  $('.modal .modal-content').click(e => e.stopPropagation());

  $('.modal, .modal-close').click(function() {
    $('.modal').removeClass('active');
    $('html, body').css('overflow', 'scroll');
  })
})

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
timequake-2.1.0 app/assets/javascripts/timequake/modals.js