$(document).ready(function() { $('.dialog').dialog({ autoOpen : false, closeOnEscape : false, draggable : false, modal : true, resizable : false, dialogClass : 'noTitle', width : 180, height : 180, zIndex : 1000000 }); $('.startLoading').click(function(e) { _startLoadingAnimation(); }); $('.button.submit').click(function(e){ $( 'form#'+$(this).attr('data-form') ).submit(); }); }); _gLoadings = 0; function _startLoadingAnimation() { if (!_gLoadings) { $('.dialog').dialog('open'); } _gLoadings++; } function _endLoadingAnimation() { _gLoadings--; if (!_gLoadings) { $('.dialog').dialog('close'); } } function requestFullscreen(el){ return; var requestMethod = el.requestFullScreen || el.webkitRequestFullScreen || el.mozRequestFullScreen || el.msRequestFullScreen; console.log( requestMethod ); if (requestMethod){ requestMethod.call( el ); } }