- What does jQuery do on the front end?
- Can we specifically tell s9y to NOT load jQuery, so a theme can load a specific version of jQuery, different from what s9y would use on the front end?
- I know I can load an older version of jQuery since s9y is using no-conflict, and this actually solves my problem. Is there a huge down side to this?
jQuery purpose on frontend
-
- Regular
- Posts: 3652
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
jQuery purpose on frontend
I have a scenario where the version of jQuery packaged with 2.0 (1.11.2) is breaking something in a theme of mine that jQuery included in 1.7.8 (1.8.3) did not.
=Don=
Re: jQuery purpose on frontend
Various plugins (lightbox comes to mind) and themes (2k11, for instance) use it in their JS. jQuery itself does not do anything since it's a library.Don Chambers wrote:What does jQuery do on the front end?
Yes. Set $serendipity['capabilities']['jquery'] = false; in your config.inc.php, bundle your own jQuery version (but set noConflict mode for that as well for plugins to work properly).Don Chambers wrote:Can we specifically tell s9y to NOT load jQuery, so a theme can load a specific version of jQuery, different from what s9y would use on the front end?
Yes. You would be loading 2 versions of the same library which means an extra http request, about 95KB loaded unneccessarily and a very bad practice. Also, you're gonna get laughed at.Don Chambers wrote:I know I can load an older version of jQuery since s9y is using no-conflict, and this actually solves my problem. Is there a huge down side to this?
The best solution would really be to fix whatever is not working with jQuery 1.11.2 any longer. This is most likely related to something in the theme's JS (or maybe a jQuery plugin used in the theme) that was deprecated in jQuery between 1.8.3 and 1.11.2. Does it give you any error message in the browser's JS console?
YL
-
- Regular
- Posts: 3652
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Re: jQuery purpose on frontend
Yeah, I know. It is not the theme's own JS, it is an included jQuery plugin that I have to update.... and really didn't want to update!!yellowled wrote:The best solution would really be to fix whatever is not working with jQuery 1.11.2 any longer. This is most likely related to something in the theme's JS (or maybe a jQuery plugin used in the theme) that was deprecated in jQuery between 1.8.3 and 1.11.2. Does it give you any error message in the browser's JS console?
=Don=
-
- Regular
- Posts: 3652
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Re: jQuery purpose on frontend
Have we ever used < jQuery 1.7 on the front end? 1.7.8 used jQuery 1.8.3.
=Don=
Re: jQuery purpose on frontend
Yes. The first jQuery ever to be bundled with the s9y core was 1.4.4.
https://github.com/s9y/Serendipity/comm ... /jquery.js
YL
https://github.com/s9y/Serendipity/comm ... /jquery.js
YL