cowboy / jquery-bbq

jQuery BBQ: Back Button & Query Library

Home Page:http://benalman.com/projects/jquery-bbq-plugin/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Uncaught TypeError: Cannot read property 'msie' of undefined

DonGiulio opened this issue · comments

Hello,

I see this error in my chrome, this is blocking my scripts from running,

I found that the only js containing the string msie is jquery-bbq.

what causes this?

thanks

jQuery BBQ hasn't been updated for quite some time. It appears to use the $.browser method, but that has been removed as of jQuery 1.9. There's a quick workaround:

<script type="text/javascript" src="jquery-1.11.0.min.js"></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;
        }
    })();
</script>

<script type="text/javascript" src="jquery.ba-bbq.min.js"></script>

Source: http://stackoverflow.com/a/16972927/76220

Thank you for this.

Hi, Do either of you know if thats the only change required to support jQuery 1.11.0 and latest browsers?

I'm starting to migrate from jQuery 1.4 and notice this project is pretty much abandoned.
Wondering whether to abandon BBQ altogether, or to soldier on trying to sift through all the pull requests, Thanks

I resolved in switching to a different approach and gave up using jquery-bbq, I generally don't like having in my applications code that is not under active maintenance.

I was just using bbq to do some easy work on url params, and it was easy to just write the code myself. and not rely on libraries for that.

thanks,

I had the same question as @carpii . I've used this library before (just for its excellent jQuery.param.querystring) but when I tried it with current jQuery I got the 'msie' error. I guess I should look to other solutions as well if this has been abandoned. https://github.com/sindresorhus/query-string looks promising, for example.