jQuery1.9.1 has no longer supported, ScrollTop and ScrollLeft methods.
Personally still feel that this update is a bit too "radical", are not backward compatible. And this time it's not like browsers in the API to point out alternative methods.
The only way to do this is to set the original element to relative, and then animate{"left": Val, the contents of the "Top": val} to scroll.
without $.browser instead of using $.support
Now I want you to use feature detection, but personally feel jQuery is a bit too radical and not backwards compatible. A program that used $.browser to probe the browser will now run with errors. I am here to put the previous $.browser code to find out, easy to use browser detection of friends to use it:
| The code is as follows |
Copy Code |
| (function ($) { var a, B; $.uamatch = function (a) { A = A.tolowercase (); var B =/(chrome) [/] ([w.] +)/.exec (a) | | /(WebKit) [/] ([w.] +)/.exec (a) | | /(opera) (?:. *version|) [ /] ([W.] +)/.exec (a) | | /(MSIE) ([w.] +)/.exec (a) | | A.indexof ("compatible") < 0 &&/(Mozilla) (?:. *? RV: ([w.] +)|) /.exec (a) | | []; return { BROWSER:B[1] | | "", VERSION:B[2] | | "0" } }, A = $.uamatch (navigator.useragent), b = {}, A.browser && (B[a.browser] =! 0, b.version = a.version), B.chrome? B.webkit =!0:b.webkit && (B.safari =!0), $.browser = B, $.sub = function () { function A (b, c) { return new A.fn.init (b, c) } $.extend (!0, A, this), A.superclass = this, A.fn = A.prototype = This (), A.fn.constructor = A, A.sub = This.sub, A.fn.init = function C (c, D) { Return d && d instanceof p &&! (d instanceof a) && (d = A (d)), $.fn.init.call (this, C, D, b) }, A.fn.init.prototype = A.fn; var B = A (e); Return a }; }) (JQuery); |