General => Chit Chat => Topic started by: Joker™ on July 20, 2014, 10:29:18 am
Title: jQuery version madness
Post by: Joker™ on July 20, 2014, 10:29:18 am
Hi everyone,
As most of the JS things are done with jQuery most of the times, but there is a ugly madness behind jQuery too... versions.
So, lets say you have used 2.0.3 or some latest version, developed a mod/feature and placed it on the web as a software for others to use. But, suddenly some other developer made a piece of code using jQuery version build way ago(lets say v 1.1), and all your mod/feature functionality got shattered into pieces, reason being the older version of jQuery doesn't contains the function you have made use of. In that case how can you tackle such madness, as you have $/jQuery object on DOM but its useless? I've made some changes in one of my mod for SMF, but I want to hear opinion of other devs, so that I can steal the best approach :D.
(Actually, using the very latest versions of everything isn't always wanted, especially in large companies where browsers are older.)
One of my mod uses 'on' 'off' methods of jquery, and another mod installed jquery 1.1, as a result the mod stopped working. So, there are cases where one needs to check the jQuery version.