Skip to main content

Bug Tracker

Side navigation

#10210 closed bug (worksforme)

Opened September 07, 2011 05:13AM UTC

Closed September 07, 2011 12:19PM UTC

Last modified September 08, 2011 06:07AM UTC

version of browser

Reported by: godligift@gmail.com Owned by:
Priority: low Milestone: None
Component: misc Version: 1.1.4
Keywords: Cc:
Blocked by: Blocking:
Description

Critical bug's with function $.browser, this function suggest using in terms of comparison, but this function getting "

undefined" in not their browser.

In result, comparison: "if($.browser.msie || $.browser.opera)" is not correct.

Attachments (0)
Change History (2)

Changed September 07, 2011 12:19PM UTC by addyosmani comment:1

_comment0: When testing against $.browser (eg. if($.browser.msie){}), note that what we return is a boolean based on a check against the userAgent strings which are exposed by the browser itself. Testing the first demo here: http://api.jquery.com/jQuery.browser/ against IE6,7,8 and Opera (latest stable) (the browsers you mention), I haven't been able to reproduce the issue you're experiencing with an undefined value. Please double-check your code to ensure you're correctly using $.browser - note that this feature may be moved to a plugin in a future release of jQuery and you should ideally be using feature detection instead.1315461102374266
component: unfiledmisc
priority: undecidedlow
resolution: → worksforme
status: newclosed

When testing against $.browser (eg. if($.browser.msie){}), note that what we return is a boolean based on a check against the userAgent strings which are exposed by the browser itself. Testing the first demo here: http://api.jquery.com/jQuery.browser/ against IE6,7,8 and Opera (latest stable) (the browsers you mention), I haven't been able to reproduce the issue you're experiencing with unexpected output. Please double-check your code to ensure you're correctly using $.browser - note that this feature may be moved to a plugin in a future release of jQuery and you should ideally be using feature detection instead.

Changed September 08, 2011 06:07AM UTC by addyosmani comment:2

#10226 is a duplicate of this ticket.