Change fixed btn position on resize
// change fixed button position on resize=========================
var ButtonPositionOnResize = function(){
var oWidth = document.getElementById('bootstrapWidth').offsetWidth;
// console.log('offset width:' + oWidth);
var wWidth = $( window ).width();
// console.log('offset width:' + wWidth);
var diff = wWidth - oWidth;
// console.log('diff : ' + diff);
if (diff>0) {
$(".toggle_mnu").css("right", diff/2);
}
else{
$(".toggle_mnu").css("right", 30);
}
}
ButtonPositionOnResize();
$(window).resize(function() {
ButtonPositionOnResize();
});