How to add and remove a class when the bootstrap popup is scroll [ #2023]

add and remove class when popup is scroll

if you need scroll to whole popup (class=”modal”): $(function () { $(‘.modal’).scroll(function () { var totop = 50; if ($(this).scrollTop() >= totop) { $(“.mycountry”).addClass(“fix”); } else { $(“.mycountry”).removeClass(“fix”); } }); }); if you need scroll to modal content (class=”modal-content”): $(function () { $(‘.modal-content’).scroll(function () { var totop = 50; if ($(this).scrollTop() >= totop) { $(“.mycountry”).addClass(“fix”); … Read more