Jquery version issue.

I could swear I posted something on this to ask for this, but I can't find it anywhere so I must be losing my mind lol. Old age setting in I guess haha.

Anyways, I have an issue with the jquery that has been set to a newer version than what I am needing, and was hoping this update I just got today (and THANK YOU for the code collapsing!) would address it, but it doesn't.

I am not a programmer so I cannot figure out how to include multiple jquery files or if that's even possible. I have some scripts running from an older version of jquery, 1.11.3, and am having issues with the fact that the app is only exporting the lowest version of 1.12.4 now and it annihilates my scripts so they are not working now. This is making me have to swap out the jquery file for the older version every time I export and upload. I have 2 projects that are live websites that I need to have the 1.11.3 version of jquery running for now (till I work out what needs to be done to update them, not a programmer so ... ), and if any newer clients need to utilize this setup I'm using there may be more that will need that version.

If there a way I can use both this 1.11.3 version for these special scripts I am using, while also using the the newer jquery versions for other things that would be great. If someone could give me some instruction on how to do that then that would fix the problem. There may already be a way to implement this, but since I'm not sure how that all works hopefully someone here will instruct me on how to do this. If not, it would be appreciated if the ability to utilize older jquery versions could be added.

Thanks and I hope that wasn't too confusing.

Usually latest 1.x should be compatible with with older 1.x versions. So your script should run, or you probably can find an updated version.

BTW, i'm using jquery 3.x everywhere in new design, no reason to support old browsers anymnore, especially now that we are getting ready for bootstrap 4, that drops support for ie8 and below. Everything gets faster, easier and snappier, with less data to download.

can you not link to the version you want to as an external JS file via CDN?

here is a list of all the versions and you can use the uncompressed or minified versions

Try using the migrate tool with the 1.12.x version and see if your script works again.

http://code.jquery.com/jquery-migrate-1.4.1.js

It's supposed to help you figure out what you need to fix in your old scripts to work for new version of the JS. https://jquery.com/upgrade-guide/3.0/#jquery-migrate-plugin

It should come before any of your other scripts so that any APIs that where removed will load again then have your script friend help to figure out what he can change in your now broken function to get it working.

Saj

@Marrco: I appreciate the fact that things "should" run, but unfortunately the don't which Saj has already helped me figure out that it was the jquery file that needed to be replaced with the older one to fix the broken scripts, so we do know it's the newer version (or the version created by the BSS app which may be faulty? wouldn't know how to know that either lol) that has caused the issue. Unfortunately I'm not a programmer so I don't know how to fix the scripts to make them up to date for the newer jquery or if they can be or anything else. Still waiting on an answer from the person that created the scripts for me, but they have been having some other issues with a new computer so haven't had time to look at my scripts yet to know what might work to make them work with the newer jquery version. I'm hoping this isn't something I'm going to have an issue with in the future when things keep updating. This is the first time I've ever encountered a jquery, javascript or any other file getting outdated to the point of not working.

Feel free to test this out yourself if you're still of the mind that it "should" work, and by all means prove us wrong! lol the live site that I've been using as the one to fix first is at: http://fpcbayminette.org and the page that is affected is the Ministry Teams page which entails a lot of tabs. The tabs are fine and work fine regardless of the jquery at this point, but I had some special scripts created for me that would help the links in the menu jump to specific tabs on that page (quite a feat it was to get that to work and it definitely needs to work). This is what is broken when updating to the new 1.12.4 jquery. I was originally using 1.11.3 which works great for it.

@Chris: I see that there is a way to add a CDN for the jquery in the BSS app, but have not used that yet. I did find the CDN links page a week or so ago, but there were so many versions ... If I use a CDN will that then override all the other jquery versions for all the other scrpts and make them use the same version too? I guess it was before anyways, but I'm thinking that it may not be a good idea if other things are going to need the newer version. As I said, I'm not a programmer so I just do the best I can to utilize what's given or that I pay others to do for me, and in this case the programmer used the older version of jquery (which was the current one at the time I think), so I'm hoping to find a way to not have this issue every time it updates.

Yeah I had seen that Saj, but couldn't find anything to tell me what to do to use it lol. I really really gotta learn some of this stuff! One of these years, but till then hopefully there will be those of you and others that will help with things like this.

So with that said, do I put this in the page after export and remove the jquery.min.js? Or do I add it just after that jquery.min.js? I have no idea what an API is so ... I do apologize for the lack of knowledge here, but I've been doing sites for a lot of years, and honestly this is the first time I've ever really come face to face with something that had to be "fixed" that I had in place already lol. Usually I can find updated versions of something if necessary, but in this case ... not so much. Thanks much for your input here as well.

Hi Jo,

Your mind seems fine, here is your previous thread ;-)

https://bootstrapstudio.io/forums/topic/ability-to-use-specific-jquery-etc-files/

1.12.4 now and it annihilates my scripts so they are not working now

What specifically are the things that it breaks ? (Maybe it's some easy or known fixes?)

Even within each version upgrade, things changed so it's possible to cause issues even within 1.x, 2.x, etc., version releases.

For instance "quotes" around anchors: https://github.com/jquery/jquery/issues/2824

It's certainly best to fully upgrade and migrate scripts and dependencies to newer versions for speed, compatibility, security, etc.

But it is possible (not recommended) to cobble multiple versions together using $.noConflict. However even JQuery says "Load two versions of jQuery (not recommended)" - https://api.jquery.com/jquery.noconflict/ & http://stackoverflow.com/questions/30481017/multiple-jquery-conflict-issue

But with doing that, you have to unnecessarily load two full versions of the complete library, when really all you need to do is find what the issues are that are causing the problem, so you can update and use the newer versions. You could also introduce new conflicts and issues by trying to do so.

Another thing to perhaps look into is using "JQuery Migrate" - https://github.com/jquery/jquery-migrate/ - & - http://blog.jquery.com/2016/05/19/jquery-migrate-1-4-1-released-and-the-path-to-jquery-3-0/

Is the issue, that you are wanting to just use the old (un-updated) scripts on those sites, or are you actually looking to support ancient browsers as well?

I hope something helps your efforts Jo. ;-)

BSS_User

EDIT: I was really writing that a long time, this thread carried on without me.

@BSS: LOL I know that feeling of threads carrying on while I type or get interrupted and have to finish typing 20 minutes later lol.

As for browsers, I'm of the mind that you need to upgrade them so just do it, so I don't care if anything supports older browsers or not, as long as what I have works it's all good lol.

I would love to be able to just update the scripts rather than going through all this, but as I mentioned a few times above, I'm just not sure what to update, not a programmer. I "can" update it if I know what needs updating for some of the basic things of course and would be happy to do so if I have some idea of where to start. I'm going to try this Migrate thing and see if that will help me narrow down the issues. Would love it if it were simple as quotes being double/single or things like that lol. That I can do!

I guess I got lost with the last thread (THANK YOU BSS_User for finding that for me!) that I posted as Martin asked if adding the CDN ability would help and I said yes, but then I realized that the CDN stuff was already in there so I thought maybe there was a different setup he meant. Maybe so, or maybe he forgot it was already in there too? Dunno lol.

I'll post again when I have tried the Migrate file and/or if I need more help on it to do that. Thanks everyone for getting my back here, hate that I don't know this stuff, but I surely appreciate that you do and are willing to help out like this.

the page that is affected is the Ministry Teams page which entails a lot of tabs. The tabs are fine and work fine regardless of the jquery at this point, but I had some special scripts created for me that would help the links in the menu jump to specific tabs on that page (quite a feat it was to get that to work and it definitely needs to work). This is what is broken when updating to the new 1.12.4 jquery. I was originally using 1.11.3 which works great for it.

Is it still related to this? https://bootstrapstudio.io/forums/topic/linking-to-tabs-of-a-tab-element/

Because: http://fpcbayminette.org/assets/js/myscripts.js is all I see that would be relative?

Yes that is exactly what it is BSS_User. I had someone create me some scripts to do this setup and they are inside the myscripts.js file (along with a few others, that is my personal scripts file so I wouldn't have to load a ton of separate scripts, not sure if that's good or bad but ... ). Everything else seems to work fine that's in that file, except for the one for the tabs so that they can be linked from within the menu in the Ministry Tabs section of the menu. He created 2 scripts setups for me, one was hash-script.js file which I don't think I need as everything in it is commented out, but ... I left it there just in case as I know sometimes things are commented out in JS and are still used and I'm not sure what's what so better to be safe than sorry lol.

P.S. IF AN ADMIN WOULD LIKE TO MOVE THIS THREAD ... to the Help and Tutorials forum that would be great as it's probably not needed here in the end since I actually did post about the jquery version issue already which BSS_User found for me.

Hi Jo,

So don't worry about the term API, think of it more along the lines of this.

Say you were using this code $(".click-me-to-popup-something").**onmouseclick**(function({going to do something}));

But then jQuery Devs decide that this would be more smart/clean or whatever $(".click-me-to-popup-something").**onclick**(function({going to do something}));

What they do is deprecate the onmouseclick function and when there is a major update it gets drop from the code in favor of onclick. Then they add it to the migrate js so that people who still need it can still use it until they update their code to use the new form of the function.

Saj

P.S. Of course I forgot to tell you that you just add the migrate js not replace the jquery js. Just add it ad probably set the order so it's the 3rd js in line.

Yeah that sounds like a typical update for most everything these days. Would be able to do it all myself if I had a clue what I was looking for lol. I understand the concepts of the updates being pretty much the same as HTML5 updating and CSS3 etc., but since I don't know what the functions of jquery/javascript are as of yet, that's where I get stuck trying to figure out what got updated. And with the tons of updates they did I'd have to go through every single updated item to see if it matches anything in my scripts. That would be horrendous to say the least and I still may not realize what it is after all that lol.

In the meantime, the person that created the scripts for me is unable to assist as he has his hands full with a very sick parent and stressed out mother due to that illness, as well as a new pc that isn't behaving itself apparently, so his mind isn't on this at all. I don't think there will be assistance there.

I'll work on that migrate file so I can buy some time and then just out of curiosity I will see if the update information is at all recognizable to me and see if I can make some of the updates myself. It could happen! Don't you laugh! lol.

Thanks again Saj and everyone else too. I'll keep you posted!

If the migrate doesn't work, I'm going to suggest try setting the order of your JS code to where myscripts.js is last. The order of JS code does matter, it is possible that myscripts is expecting some JS code to be available before the now broken function gets executed. I realize that none of that might have changed before but JS can be funky that way.

Saj

I'll try that tomorrow as well Saj. I think I did try that already though, but I can't remember so I'll try it again just in case lol. Thanks for the suggestion.