Bug Tracker

Modify

Ticket #10210 (closed bug: worksforme)

Opened 3 years ago

Last modified 3 years ago

version of browser

Reported by: godligift@… Owned by:
Priority: low Milestone: None
Component: misc Version: 1.1.4
Keywords: Cc:
Blocking: Blocked by:

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.

Change History

comment:1 Changed 3 years ago by addyosmani

  • Priority changed from undecided to low
  • Resolution set to worksforme
  • Status changed from new to closed
  • Component changed from unfiled to misc

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.

Version 0, edited 3 years ago by addyosmani (next)

comment:2 Changed 3 years ago by addyosmani

#10226 is a duplicate of this ticket.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.