css - Scrollable dynamic content -
i building custom lightbox jquery , wondering when need scroll form responsive site. on screen sizes form grows below fold when go scroll page site behind scrolls instead. how put focus on new dynamic content scrollability?
click contact button after scrolling down page bit.
here code working with.
$('#contact').on( 'click', function(e){ e.preventdefault(); $('#modal').remove(); $('body').append('<div id="modal"></div>'); $("#modal").load('/forms/contact-form.html').hide().fadein(1000); }); #modal{ position:absolute; overflow:auto; top:0; z-index:5000; width:100%; height:100%; background:rgba(255, 255, 255, .95) url(../images/diag-pattern.png) repeat 0 0; }
the problem not getting focus on dynamic content. problem content not scrollable because used position: fixed
without overflow: auto
. make contact form scrollable, add overflow: auto
css #modal
.
Comments
Post a Comment