221
edits
No edit summary |
No edit summary |
||
Line 748: | Line 748: | ||
document. | $(document).ready(function() { | ||
var specialChars = | var $specialChars = $('#editpage-specialchars'); | ||
var elementOffsetTop = $specialChars.offset().top; | |||
var elementOffsetTop = specialChars. | |||
if (scrollTop >= elementOffsetTop) { | $(window).on('scroll', function() { | ||
var scrollTop = $(window).scrollTop(); | |||
if (scrollTop >= elementOffsetTop) { | |||
} | $specialChars.addClass('sticky-sidebar'); | ||
} else { | |||
$specialChars.removeClass('sticky-sidebar'); | |||
} | |||
}); | |||
}); | }); |