add and remove class when popup is scroll

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

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"); }
 else { $(".mycountry").removeClass("fix"); } }); });