Check width of window and do actions.
function mobile() {
var checkWidth = $(window).width();
if (checkWidth > 1199) {
$(".team-carousel").insertAfter(".team-details");
}
else if (checkWidth < 1199) {
$(".team-details").insertAfter(".team-carousel");
}
}
$(document).ready(mobile);
$(window).resize(mobile);