Yes, he will continue to work. Changing the protocol is the same effect as changing any other part of the URL - it will violate the policy of the same origin and will lead you to cross-domain mode. If you already have access to cross-domain access, it will continue to work with https, as well as with http.
Please note that you still have to deal with a situation where one or both of your secure sites have invalid credentials. If you try to execute the AJAX method at a secure URL with a certificate with no hope or expired, the browser will warn the user about it no matter how and what you are trying to do.
source share