Sha256: e5647fb9ea466add1638d803efd1f5df4e4e724e204bdb4ae05443971f6490e3
Contents?: true
Size: 633 Bytes
Versions: 21
Compression:
Stored size: 633 Bytes
Contents
$(document).ready(function() { $('.modal-open').click(function(e) { e.preventDefault(); let model = $(this).data('modal'); let needTallModal = window.innerHeight < $('.modal-content').height(); let thisModal = $('.modal.' + model) thisModal.addClass('active'); $('html, body').css('overflow', 'hidden'); needTallModal ? thisModal.addClass('modal-tall') : thisModal.removeClass('modal-tall'); }) $('.modal .modal-content').click(e => e.stopPropagation()); $('.modal, .modal-close').click(function() { $('.modal').removeClass('active'); $('html, body').css('overflow', 'scroll'); }) })
Version data entries
21 entries across 21 versions & 1 rubygems