Fixed Upgrade jQuery

1.9 and 2 shares the same API, so we can upgrade to 1.9 and when IE8 goes past advertised lifetime (the whole IE series is past its lifetime anyways) we can upgrade to the 2.x series.
jQuery 2.0 beta-2 Released

Since jQuery 2 is well on its way, it may be best to wait a little longer and implement that.
There is a problem with that though: jQuery 2 does not support IE8 or lower. Currently IE8 is still used widely.
With IE conditionals, we can use 1.9 for IE8 and 2.0 for everyone else. That's something jQuery and them have been talking about if you really need IE8 support.
 
FWIW, I have XF 1.2 (and jQueryTools) seemingly all working with jQuery 1.8.3. I tried 1.9.1 as well (with the migration package) and started getting some errors deep in jQuery regarding some animations; I haven't tracked down the cause of that yet. I'm going to continue to see if I can get 1.9.1 working without much issue.

jQuery 2.0 is basically a non starter as I expect to be supporting IE8 for a while.

Also FYI, to developers that have written custom JS for their add-ons, this may end up being a fairly big BC break. Changes of note: if you have data-x attributes where x is written as camelCase, you need to change your JS to reference them as lower case (this follows the HTML5 spec). Also, you'll need to deal with the attr vs prop change in jQuery. All standard XF JS has been updated and it shouldn't require any HTML changes to work (though your data-camelCase attributes should be changed to lower case just to be clearer).
 
FWIW, I have XF 1.2 (and jQueryTools) seemingly all working with jQuery 1.8.3. I tried 1.9.1 as well (with the migration package) and started getting some errors deep in jQuery regarding some animations; I haven't tracked down the cause of that yet. I'm going to continue to see if I can get 1.9.1 working without much issue.

jQuery 2.0 is basically a non starter as I expect to be supporting IE8 for a while.

Also FYI, to developers that have written custom JS for their add-ons, this may end up being a fairly big BC break. Changes of note: if you have data-x attributes where x is written as camelCase, you need to change your JS to reference them as lower case (this follows the HTML5 spec). Also, you'll need to deal with the attr vs prop change in jQuery. All standard XF JS has been updated and it shouldn't require any HTML changes to work (though your data-camelCase attributes should be changed to lower case just to be clearer).
You've already modified all the XenForo Javascripts? That's a huge work ! Great news.

So what option did you choose regarding the HTML5 specification ("data") problem, update all templates or modify the js code?

Jquery 1.9 don't have any more its quick functions to detect the browser, will you add a class to the xenforo js to help with that (see here, even if the code is really really basic) ?

And for the record, developers would also need to use the on/off functions instead of the bind/live ones.
 
The JS has to be modified. data-camelCase will only be accessible to JS via .data('camelcase').

If I get past the other issues, I will likely leave the jQuery 1.9 migration package in, at least for 1.2, to ease the transition. But I'm not sure yet.

Good point about .live() being deprecated as well.
 
FWIW, I have XF 1.2 (and jQueryTools) seemingly all working with jQuery 1.8.3. I tried 1.9.1 as well (with the migration package) and started getting some errors deep in jQuery regarding some animations; I haven't tracked down the cause of that yet. I'm going to continue to see if I can get 1.9.1 working without much issue.

jQuery 2.0 is basically a non starter as I expect to be supporting IE8 for a while.

Also FYI, to developers that have written custom JS for their add-ons, this may end up being a fairly big BC break. Changes of note: if you have data-x attributes where x is written as camelCase, you need to change your JS to reference them as lower case (this follows the HTML5 spec). Also, you'll need to deal with the attr vs prop change in jQuery. All standard XF JS has been updated and it shouldn't require any HTML changes to work (though your data-camelCase attributes should be changed to lower case just to be clearer).
Really great News! Glad to hear from the jQuery Update!
That also means, thar we farely can use the .on instead of .click and .live
 
FWIW, I have XF 1.2 (and jQueryTools) seemingly all working with jQuery 1.8.3. I tried 1.9.1 as well (with the migration package) and started getting some errors deep in jQuery regarding some animations; I haven't tracked down the cause of that yet. I'm going to continue to see if I can get 1.9.1 working without much issue.

jQuery 2.0 is basically a non starter as I expect to be supporting IE8 for a while.

Also FYI, to developers that have written custom JS for their add-ons, this may end up being a fairly big BC break. Changes of note: if you have data-x attributes where x is written as camelCase, you need to change your JS to reference them as lower case (this follows the HTML5 spec). Also, you'll need to deal with the attr vs prop change in jQuery. All standard XF JS has been updated and it shouldn't require any HTML changes to work (though your data-camelCase attributes should be changed to lower case just to be clearer).
Thank you so much, Mike :D I'm very happy to bring my code up to snuff with modern standards, and having a modern version of jQuery to work with will help so much in that regard - as well as making things significantly easier on add-on developers!
 
FWIW, I have XF 1.2 (and jQueryTools) seemingly all working with jQuery 1.8.3. I tried 1.9.1 as well (with the migration package) and started getting some errors deep in jQuery regarding some animations; I haven't tracked down the cause of that yet. I'm going to continue to see if I can get 1.9.1 working without much issue.

jQuery 2.0 is basically a non starter as I expect to be supporting IE8 for a while.

Also FYI, to developers that have written custom JS for their add-ons, this may end up being a fairly big BC break. Changes of note: if you have data-x attributes where x is written as camelCase, you need to change your JS to reference them as lower case (this follows the HTML5 spec). Also, you'll need to deal with the attr vs prop change in jQuery. All standard XF JS has been updated and it shouldn't require any HTML changes to work (though your data-camelCase attributes should be changed to lower case just to be clearer).

Since the APIs for both 1.9 and 2.0 are the same, will there be an option for site owners to choose which version to use (should the site owner despise IE8)? Or will this break more things?
 
FWIW, I have XF 1.2 (and jQueryTools) seemingly all working with jQuery 1.8.3. I tried 1.9.1 as well (with the migration package) and started getting some errors deep in jQuery regarding some animations; I haven't tracked down the cause of that yet. I'm going to continue to see if I can get 1.9.1 working without much issue.

jQuery 2.0 is basically a non starter as I expect to be supporting IE8 for a while.

Also FYI, to developers that have written custom JS for their add-ons, this may end up being a fairly big BC break. Changes of note: if you have data-x attributes where x is written as camelCase, you need to change your JS to reference them as lower case (this follows the HTML5 spec). Also, you'll need to deal with the attr vs prop change in jQuery. All standard XF JS has been updated and it shouldn't require any HTML changes to work (though your data-camelCase attributes should be changed to lower case just to be clearer).

The JS has to be modified. data-camelCase will only be accessible to JS via .data('camelcase').

If I get past the other issues, I will likely leave the jQuery 1.9 migration package in, at least for 1.2, to ease the transition. But I'm not sure yet.

Good point about .live() being deprecated as well.

jQuery 1.8.3 arguably had a memory leak. I say arguably, because officially the development said there was none, but developers (lots of them) said otherwise.

http://lmgtfy.com/?q=jQuery 1.8.3 memory leak

It is also interesting to note that those who complained about 1.8.3 (myself included), had no issues with 1.9.0 or 1.9.1 ... So I'd be very happy to see 1.9.1 introduced. :)

I do wonder out of curiosity... Why did XenForo decide upon jQuery Tools when jQuery UI is more active in development. jQuery Tools 1.2 was released over a year ago and by default still suggest jQuery 1.7.2, while jQuery UI is normally kept current with jQuery release (which does support jquery 1.9.1 out of the box)?! :confused:
 
1.10 is out now though. :)

jQuery 1.10?

Well_that_escalated_quickly.jpg
 
1.10 is out now though. :)
And I'm for XenForo adapting this.

I'm sure with the new editor, it should be easier to apply.

And at the very least, XenForo shouldn't be developed in such away in which would keep it "hard coded" to be dependent on one fixed version.
 
Top Bottom