Laravel blade use $(document).ready function

前端 未结 2 1390
失恋的感觉
失恋的感觉 2021-01-13 14:32

I\'m trying to use laravel blade templates including some javascript code into child view.

I have my mail app.blade.php file, where is placed string

2条回答
  •  说谎
    说谎 (楼主)
    2021-01-13 15:16

    I had this same problem which seemed more to do with the js files being loaded in with the defer attribute.

    I was getting the same console warning about $ not being defined.

    So I tested this notion with...

    
    

    Which then worked, so I assume it's to do with defer (using Firefox Developer Edition on Linux Mint).

    Anyway, a good reason to put all my scripts into proper js files ;-)

提交回复
热议问题