Update the session variables for browser width and height when browser is resized

This commit is contained in:
Louis Bailleul
2015-11-19 14:14:29 +00:00
parent 6116f00e58
commit bafdeaf9ee

View File

@@ -123,6 +123,7 @@ $(document).ready(function() {
}); });
}); });
updateResolution();
}); });
function submitCustomRange(frmdata) { function submitCustomRange(frmdata) {
@@ -155,7 +156,12 @@ $(document).on("click", '.collapse-neighbors', function(event)
continued.toggle(); continued.toggle();
}); });
$(function() { function updateResolution()
$.post('ajax_setresolution.php', { width: $(window).width() , height:$(window).height() }, function(json) { {
$.post('ajax_setresolution.php', { width: $(window).width() , height:$(window).height() }, function(json) {
},'json'); },'json');
}); }
$(window).on('resize', function(){ updateResolution();});