jQuery 2.0 was released.
Maybe we need ship plugin with 2 versions (1.9-1.10 and 2.0-2.1-future)?
To load new one:
#= require jquery2
Ideally the plugin would have both and a method to allow us to send jQuery 1.9 to the browsers not supported by 2.0 while sending the 2.0 ones to the still supported browsers.
Saves a little bandwidth, would require two sets of compiled js files and some IE conditionals though.
If that is too much faff then including both and just changing the require as mentioned above would probably be best.
@JangoSteve we wait for new version ^_^
@indirect waiting for 2.0 ^_^
jQuery 2 would be great!
Our app requires IE9 so JQuery 2 support would be great (we have already removed all deprecations and removed jquery-migrate). At the same time, we would use JQuery 1.9 or 1.10 for our web site via an older version of jquery-rails.
There isnt jQuery 2 for Rails about a month. Maybe just addjquery2.js` to gem, to allow include it only in non-IE8 sites (without any hacks with changing version).
t jQuery 2 for Rails about a month. Maybe just add
Just released v3.0.0 which has jQuery 1.10.0 included. We definitely won't be packaging jQuery 2.0 as the default, but I could probably be on board with adding it as jquery-2.js and allowing it to be swapped out for jquery.js if desired. I first need to make sure that jquery-ujs is compatible with jQuery 2.0 though when I get time.
@JangoSteve sounds good.
+1 for adding 2.0 as an option.
+1 for 2.0
Any progress on this? Would be awesome to use jQuery 2 :)
Do we know if jquery-ujs is compatible with JQuery 2.0?
@JangoSteve why not just add jquery-2.0.js to gem?
++ for 2.0! Any updates on this?
JQuery 2.0 was released on April 18th, so it's definitely due time to support here.
First someone needs to ensure that jquery-ujs supports it. I didn't see any tickets or pull requests there for it, whether opened or closed.
That's why I provided a link to the jquery-ujs repo, and looked there to see if anything had been done for JQ 2.0 support. In theory it should "just work" but I haven't had time to test it.
@indirect jQuery is much faster and jquery-rails is a common way to add jQuery to your site (even if you use CDN with jquery-rails-cdn, you will use jquery-rails on development). So without jQuery 2.0 in jquery-rails I can’t make my site faster (we don’t support IE 8) and there is no sense to make own jquery gem (for example, without jquery-ujs to update jQuery faster).
@nathany yes — but I disagree with your assertion that its "definitely due time to support here". 1.9 is the compatible and maintained version of jQuery. 2.0 is a fork with lower compatibility. If you want that, please go ahead, and we'll add 2.0 to this gem once we figure out a good way to do it without breaking backwards compatibility for people who use this gem.
@ai if you're unhappy, fixing it yourself is always an option.
@indirect why you ask about compatibility? We suggest to put jQuery 2.0 is separated file like jquery-2.js.
And jQuery 2 is not only about lower compatibility. We develop mobile site and jQuery 2.0 may improve our perfomance.
As soon as I get some time (hopefully in the next day or so), I'll add it to the jquery-ujs test suite and make sure everything works (at least on the target browsers for jquery 2.0). Once I can confirm that, we can add it as a non-default option for jquery-rails.
@JangoSteve maybe we can help with jQuery 2.0?
If you want jQuery 2 and don’t need UJS you can use jquery-cdn gem.
Any information about what's holding this up?
I have moved to using bower. You can include any version.
Gem jquery-cdn contains latest jQuery 2.0 and can be loaded by better ways (like CDN with fallback).
I think we can meanwhile use jquery 1 and 2。
<!--[if lt IE 9]> <script src="jquery-1.9.0.js"></script> <![endif]-->
<!--[if gte IE 9]><!--><script src="jquery-2.0.0.js"><</script> <!--<![endif]-->
and maybe，we can identify the browser version come by UA
jQuery 2.1.0 is already release and we still haven’t jQuery 2.0 ;)
+1 for jQuery 2 support
+1 to get a jQuery v2.X version supported. CDNs are not always an option for closed network applications.
Hey everyone. I was just talking with @lucasmazza about what needs to be done to bring this in. The primary reasons I've been hesitant until now is:
@lucasmazza and I can go ahead and get the ball moving on both of these so we can finally bundle jQuery 2 for those who prefer it.
1) Leaving the current jquery in :defaults would be fine. Dropping 3.0 support works too.
2) I don't think this is an issue. require_tree . is relative to that file; it won't pull in jquery files from other asset paths.