internet explorer - jQuery.browser script or shim for backwards-compatibility of plugins with 1.9.1 -


I'm trying to use the jquery plugin quicksand and I'm getting this error with jquery 1.9.1 .

"Unkit type error: Undefined" msie "property can not be read

I know that the MSI jQuery.browser property is on jQuery.browser The flag was deprecated since version 1.3 and it was removed in jQuery 1.9.0

That is why it is causing the error but is there a fix so that the quick work is working again

Any help or advice would be great!

Thanks in advance!

fearless day Note for walper

A (mandatory) word jQuery.browser and on jQuery.support :

jQuery.browser Read the flag from the user, We recommend using this property ; instead the feature Try to locate (see jQuery.support ). jQuery.browser to be moved to the plugin in the future release of jQuery Could.

Instead of $. To use the browser, to determine the current user agent and to change the page presentation based on which browser is running, this is a good practice to locate the feature . To simplify this process, jQuery performs many such tests and sets the properties of the object.

Ethics of the story: Update your projects, remove dependence on the jQuery browser , and use the feature to locate where necessary . Check out the areas where your projects are more dependent on the incomplete or extracted methods or properties, to check and find them.

See also and the option to locate the gesture feature.


A jQuery $ Shim file to replace browser , courtesy of Fancybox-Rail project:

  // jQuery 1.9 has removed `$ .browser` property, fancybox / / , Then we patch it here if it is missing // it has been copied from jQuery 1.1.1 Migrate if (! JQuery.browser) {var uaMatch = function (ua) {ua = ua.toLowerCase (); Var match = / (chrome) [\ /] ([\ w.] +) /. Exec (ua) || / (Webkit) [\ /] ([\ w.] +) /. Exec (ua) || / (Opera: (*: * Version |) [\ /] ([\ w.] +) /. Exec (ua) || / (MSI) ([\ w.] +) /. Exec (ua) || Ua.indexOf ("compatible") & lt; 0 and amp; Amp; / (Mozilla) (?:. *? Rv: ([\ w.] +) |) Exec (ua) || []; Return {Browser: Match [1] || "", Version: match [2] || "0"}; }; Matched = yuan match (navigator.usager); Browser = {}; If (matched browser) {browser [matching. Browser] = true; Browser. Version = matching Edition; } // Chrome is WebKit, but webkit is also Safari if (browser.chrome) {browser.webkit = true; } And if (browser.webkit) {browser.safari = true; } JQuery.browser = Browser; }   



Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -