Lance
Lance

Reputation: 4820

Javascript console: Uncaught TypeError: Cannot read property 'safari' of undefined

I wanted to optimize my page loads recently so I switched from regular javascript files to ones that are minimized. They all work fine except for this one jquery.ui files. When I switched my ui file to one that's minimized, I get an error in chrome's javascript console that reads:

Uncaught TypeError: Cannot read property 'safari' of undefined 

I'm not sure why I'm getting this error because before I switched from the regualar jquery.ui to the minimized one, it was working just fine.

Thanks,

Lance

Upvotes: 2

Views: 5841

Answers (3)

Eric
Eric

Reputation: 97571

jQuery UI is referencing $.browser, which is undefined. Your minimized UI file is clearly for use with an older version of jQuery .

Upvotes: 0

Matt
Matt

Reputation: 75317

You're using jQuery 1.9.1, which no longer includes the jQuery.browser property. You'll either need to switch back to an older version of jQuery (< 1.9), or use the migrate plugin.

Upvotes: 1

VisioN
VisioN

Reputation: 145398

The answer is that in jQuery 1.9 property $.browser was removed.

You should update your minimized jQuery UI to be compatible with new version of jQuery.

REF: jQuery.browser: Javascript Uncaught TypeError

Upvotes: 3

Related Questions