There's a few possible options to fix this:
* Fix whatever is doing the AJAX to not reload all the Javascript files, code, CSS and everything else that is currently happening.
data = data.replace (/<link.*?(bootstrap|css\-compiled\/master).*?(\/)?>\n/ig, "", data);
jfbc.base = 'http://www.yourdomain.com/';
jfbc.return_url = 'L2ZvcnVtcy9qZmJjb25uZWN0L2pmYmNvbm5lY3Qtam9vbWxhLTI1LXN1cHBvcnQvNjk1OS1mYWNlYm9vay1wYWdlLWtlZXBzLXJlZGlyZWN0aW5nLWZvci10aGUtbmV3LXZlcnNpb24tNTE=';
jfbc.login.scope = 'email,publish_actions,user_location';
jfbc.login.show_modal = '0';
js.src = "//connect.facebook.net/en_GB/all.js";
Join our newsletter to get alerts for Joomla releases, tips and tricks and extension updates.