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
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
Share Improve this question edited Apr 25, 2016 at 12:40 Aldracor 2,1811 gold badge20 silver badges28 bronze badges asked Feb 18, 2013 at 12:53 LanceLance 4,83016 gold badges55 silver badges90 bronze badges 2- 1 Are you using the correct version for you jQuery version? Which one are you using? – Felix Kling Commented Feb 18, 2013 at 12:56
- @FelixKling 1.9.1, while jQuery UI is 1.8.9. – VisioN Commented Feb 18, 2013 at 13:04
3 Answers
Reset to default 3The answer is that in jQuery 1.9 property $.browser
was removed.
You should update your minimized jQuery UI to be patible with new version of jQuery.
REF: jQuery.browser: Javascript Uncaught TypeError
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.
jQuery UI is referencing $.browser
, which is undefined
. Your minimized UI file is clearly for use with an older version of jQuery .