Files
opensem/resources/views/load/functions.blade.php
2021-03-26 15:40:53 +01:00

18 lines
378 B
PHP

@if(!defined('LOAD_FUNCTIONS'))
@push('scripts')
<script>
function delay(callback, ms) {
var timer = 0;
return function() {
var context = this, args = arguments;
clearTimeout(timer);
timer = setTimeout(function () {
callback.apply(context, args);
}, ms || 0);
};
}
</script>
@endpush
@php(define('LOAD_FUNCTIONS', true))
@endif