Blog

Upgrading to jQuery 1.9 removes $.browser function.

I had a mysterious thing happen when I upgraded my site to the latest version jQuery… a several cool UI features stopped working. I started getting the follow error message:

TypeError: $.browser is undefined

It turns out that the problem is caused by the $.browser function that has been deprecated for a while has finally been removed.

I found an easy fix. This project on github https://github.com/pupunzi/jquery.mb.browser. When added to your site, will restore great functionality like:

$($.browser.webkit ? document.body : 'html').stop(true).animate({'scrollTop': $section.offset().top}, 500);

As usual Google is my best friend!

Tags: