getgrav / grav-skeleton-striped-site

Striped by HTML5 UP, features a clean, minimalistic design, styling for all basic page elements, a repositionable sidebar (left or right), and HTML5/CSS3 code designed for quick and easy customization.
https://getgrav.org
Other
10 stars 6 forks source link

Jquery not defined #5

Open LabInc-Nico opened 5 years ago

LabInc-Nico commented 5 years ago

Hi,

After fresh install (unzip grav-skeleton-striped-site-v1.0.3) :

ReferenceError: jQuery is not defined jquery-ui.js:14:3
ReferenceError: $ is not defined sunshine-in-the-hills:24:9
TypeError: $(...).datepicker is not a function sunshine-in-the-hills:50:32

Nico.

da-rf commented 5 years ago

This is due to a mistake in the ordering of the js includes. jquery-ui is added prior to jquery, causing the error you show. Including jquery before jquery-ui removes the error. I submitted a pull request in the theme repo to fix this.

ghost commented 5 years ago

Still a error :/ @da-rf did u have a workaround to fix itself?

da-rf commented 4 years ago

Sorry, didn't see this until now. The pull request i submitted fixes the problem, but the developers haven't merged it yet.

The change needed to fix this is simple. You can fix your local version by making the changes shown in my pull request:

https://github.com/getgrav/grav-theme-striped/pull/9/commits/b419f9b9c38667183aab35c20ba47d3ea796e2d0

Just move those three lines in the base.html.twig file for the theme and the problem should be solved.