Skip to content

Commit 9108be2

Browse files
author
Shane Stebner
committed
on scrolling tall alert, background wasn't position: fixed. Is now :)
1 parent 7c6bdac commit 9108be2

File tree

3 files changed

+5
-150
lines changed

3 files changed

+5
-150
lines changed

src/jAlert-v3.css

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/jAlert-v3.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,16 +246,16 @@
246246
}
247247

248248
alert.instance.css('margin-top', top+'px');
249+
250+
$('body').css('overflow', 'hidden');
249251

250252
if( diff > 5 )
251253
{
252254
alert.instance.parents('.ja_wrap').css('position', 'fixed');
253-
$('body').css('overflow', 'hidden');
254255
}
255256
else
256257
{
257258
alert.instance.parents('.ja_wrap').css('position', 'absolute');
258-
$('body').css('overflow', 'auto');
259259

260260
/* Scroll to alert */
261261
$('html, body').animate({

0 commit comments

Comments
 (0)