jQuery removed the $.browser feature in 1.9+, instead wanting developers to rely on features. A lot of contrib modules use $.browser, and given the way this change impacts things, could present pretty big obstacles in upgrading modules. Until Drupal requires jQuery 1.9+, thus removing $.browser completely, I think a good alternative would be to add a $.browser plugin when a user is using 1.9+. There's one on Gihub:
https://github.com/gabceb/jquery-browser-plugin
I've used it on a couple of projects needing 1.9+ and it works great. I was thinking it should be included with the core jquery_update project. Considering that is just the stripped out jQuery $.browser implementation, it falls under the same license as jQuery and shouldn't present a problem with including it in the module.
Comments
Comment #1
Jamie Holly CreditAttribution: Jamie Holly commentedComment #2
phayes CreditAttribution: phayes commentedThe jQuery project (https://jquery.com/download/) states:
It seems that we should be giving site-admins the option of enabling the jquery-migrate plugin (not the browser plugin). The jQuery migrate plugin can be found here: https://github.com/jquery/jquery-migrate/
Comment #3
phayes CreditAttribution: phayes commentedThere is a patch to add the jquery-migrate plugin here: https://drupal.org/node/2156881, which should fix this issue.
Comment #4
Elijah LynnComment #5
markhalliwellI agree with @phayes/@Elijah Lynn, this should be supported by the jQuery Migrate plugin. We shouldn't directly add support for this particular issue back into the codebase (independently), thus I'm closing this issue in favor of that direction.