New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removed jQuery dependency #57
Conversation
With jQuery required so explicitly, this pretty much forces the user to have assets at the top of the file, else jQuery will be undefined. By removing the dependency on jQuery, this is still cross-browser compatible but now allows for JS assets to be output anywhere else in the page.
Thanks for this. I'll take a look!! |
Avoid checking for the search button if the setting says not to show it.
I don't mind removing the jQuery dependency, but another option is to instead load the JS in its own file, and assign a priority high enough, to suit the priority that most themes give to jQuery. |
And also we should probably have some convention / guidelines for priorities to assign to base libraries, and user JS files? |
Indeed. |
The query params style attributes is purely for 'prettyness and simplicity' really and a more friendly approach as opposed to regular params with an initial However, Grav still supports regular queries and if it doesn't already we can easily check both |
It didn't work with the regular query params, no, I tried. I think it should support regular query params as well (check for both), but maybe prioritize one over the other, to accommodate all users. |
Added an issue for this |
Now I just need to test! |
Thanks @Swader, finally merged |
With jQuery required so explicitly, this pretty much forces the user to have assets at the top of the file, else jQuery will be undefined. By removing the dependency on jQuery, this is still cross-browser compatible but now allows for JS assets to be output anywhere else in the page.