Updating jQuery

Use this forum to talk about Nova and ask any questions you may have about it. Please use the Help & Support forum if you have found a bug or need help getting something working.

Williams Sat Jan 14, 2017 4:26 pm

Updating jQuery

Quick question - and I'm new to using jQuery, so forgive me if the answer ends up being obvious or not.

I'm thinking of taking a look at adding a simple wysiwyg editor to mission posts, and Froala is the one I was looking at (although that looks to need you to buy a license, so I might have to look at different ones instead). Problem is, it requires jQuery 1.11.0 or higher, and Nova is currently on 1.8.2.

My question (well, two questions really):
To make use of the relevant jQuery version, can I just change the <script> tag at line 32 of nova/modules/assets/include_head_admin.php? Or do I need to also update all of the various JS files that are part of Nova (for jQuery UI and so on)?

The second part of my question; will anything that uses jQuery need re-working to stop it from breaking if I switch it to using a more recent version? Or should the vast majority of things remain unaffected? (I understand this depends on what version of jQuery I pick, since jQuery goes up to 3.1.1 now, but let's assume I just go to 1.11.0 for simplicity's sake).
Matt aka
Krace / Williams

USS HighlanderMy Xtras Profile
ImageImage

Posts: 288


Williams Sat Jan 14, 2017 11:39 pm

Re: Updating jQuery

Ended up using TinyMCE (which looks a lot cleaner and modern than the screenshots I was seeing googling for an editor) which doesn't rely on jQuery, so ended up not having to play around with it at all, but still would be good to know what would be needed to update the jQuery being used by the site, in case I or anyone else wants to play around with stuff in the future that requires a more up to date version.
Matt aka
Krace / Williams

USS HighlanderMy Xtras Profile
ImageImage

Posts: 288


AgentPhoenix Sun Jan 15, 2017 11:53 am

Re: Updating jQuery

Not sure how I missed the original post from way back when. Sorry about that.

The short answer is that yes, you can update those core files and be able to start using a newer version of jQuery. The longer answer is that you will almost undoubtedly break stuff in the process. Nova likely uses methods and functions that are no longer in jQuery. You'd also probably need to update jQuery UI to a newer version as well. There used to be a migration tool that would help with that sort of thing, but I'm not sure if that's around anymore. There would probably be a lot of work involved in getting up to a newer version of jQuery.
User avatar

Posts: 7567



Return to General

Who is online

Users browsing this forum: No registered users and 2 guests

cron