Skip to content
Grav 2.0 is officially stable. Read the announcement →
General

Override JQuery in Grav

Started by Pedro M 4 years ago · 24 replies · 1348 views
4 years ago

Just tried the simplest way

  • Install fresh Grav
    • No changes - jQuery loads
    • Delete {% do assets.addJs('jquery', 101) %} in line 30 of Quarks base template - jQuery is gone
  • Install fresh Grav + Admin
    • No changes - jQuery loads
    • Delete {% do assets.addJs('jquery', 101) %} in line 30 of Quarks base template - jQuery still loads
4 years ago

@Karmalakas, in your second test, are you talking about jQuery being loaded when Admin is displayed or when the site is displayed?

In case you are talking about Admin loading jQuery, then that would be as expected.

4 years ago

Frontpage site - https://test-grav.local
Didn't even bother to create account on Admin 🙂
Both All four cases tested only on frontpage

4 years ago

@Karmalakas,

Repeating your second test:

  • Install fresh Grav + Admin
  • No changes - jQuery loads
  • Delete {% do assets.addJs('jquery', 101) %} in line 30 of Quarks base template -

Result: jQuery is not being loaded in front-end

4 years ago

:man_facepalming: Once again I fail...

Forgot about the promise to search whole project.. Did the search after I just couldn't figure out what was happening (apparently I didn't notice I was redirected to admin page when testing previously, because I was on view-source:https://test-grav.local/ and source top looks exactly the same of frontpage and account form page)... Anyway, exact same {% do assets.addJs('jquery', 101) %} buried deep in one of the templates in my theme which loads form

It's like triple fail at once..
Sorry for time wasted. Will close the issue on GH

Suggested topics

Topic Participants Replies Views Activity
General · by Hanns Mattes, 11 hours ago
1 14 3 hours ago
General · by Andy Miller, 3 hours ago
0 8 3 hours ago
General · by Jerry Hunt, 5 days ago
2 136 1 day ago
General · by pamtbaau, 2 days ago
1 93 2 days ago
General · by Andy Miller, 2 days ago
0 78 2 days ago