Uncaught TypeError: Cannot read property 'msie' of undefined - jQuery tools


I am getting the following error in Chrome dev console:

Uncaught TypeError: Cannot read property 'msie' of undefined

My understanding is that it is because .browser is now deprecated in jQuery however I am using the latest version of jQuery tools and it is still giving the error, I checked in the js file and it is there.

How can I get around this so it does not give the error?

2/17/2013 4:31:25 PM

Accepted Answer

The $.browser method has been removed as of jQuery 1.9.

jQuery.browser() removed

The jQuery.browser() method has been deprecated since jQuery 1.3 and is removed in 1.9. If needed, it is available as part of the jQuery Migrate plugin. We recommend using feature detection with a library such as Modernizr.

jQuery Core 1.9 Upgrade Guide.

As stated in the Upgrade Guide you can try using the jQuery Migrate plugin to restore this functionality and let jQuery Tools work.

6/20/2020 9:12:55 AM

Use the following script tag in your jsp/js file:

<script src=""></script>
<script src=""></script>

this will work for sure.


I use below code after js file include and it's working now.

<script src="js/jquery-ui.min.js" type="text/javascript"></script>
<script type="text/javascript">
    jQuery.browser = {};
    (function () {
        jQuery.browser.msie = false;
        jQuery.browser.version = 0;
        if (navigator.userAgent.match(/MSIE ([0-9]+)\./)) {
            jQuery.browser.msie = true;
            jQuery.browser.version = RegExp.$1;

Here is the jQuery Tools bug on GitHub. You can try one of the patches.

edit — it doesn't look to me as if jQuery Tools is getting much support. I personally would not begin a new project with a dependency on that library unless I were prepared to take over support myself.


I've simply added

jQuery.browser = {
    msie: false,
    version: 0

after jquery script, because I don't care about IE anymore.


Replace Your JS with

<script src="//"></script>
<script src="//"></script>

Source link