For anybody that come accros this in future. The solution, obviously with your own id's:
$(function(){
// initial size adjustments
resizeMe();
// Resized window!
$(window).on("resize",function(){
resizeMe();
});
});
function resizeMe(){
if ($(window).width() <= 768){
$('#sidebar-nav').insertAfter('#myJumbotron');
}else{
$("#sidebarBG").prepend($("#sidebar-nav"));
}
};