18 lines
378 B
PHP
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 |