Skip to content

Commit 7860cfd

Browse files
committed
fix: use DOMContentLoaded
1 parent 68b8959 commit 7860cfd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/resources/views/script.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$(function(){window.{{ config('datatables-html.namespace', 'LaravelDataTables') }}=window.{{ config('datatables-html.namespace', 'LaravelDataTables') }}||{};window.{{ config('datatables-html.namespace', 'LaravelDataTables') }}["%1$s"]=$("#%1$s").DataTable(%2$s);});
1+
document.addEventListener('DOMContentLoaded',function(){window.{{ config('datatables-html.namespace', 'LaravelDataTables') }}=window.{{ config('datatables-html.namespace', 'LaravelDataTables') }}||{};window.{{ config('datatables-html.namespace', 'LaravelDataTables') }}["%1$s"]=$("#%1$s").DataTable(%2$s);});
22
@foreach ($scripts as $script)
33
@include($script)
44
@endforeach

0 commit comments

Comments
 (0)