文档介绍:1 外文文献: DOM with jQuery utility functions — Using the jQuery flags Using the jQuery flags Some of the information jQuery makes available tous as page authors, and even plugin authors, is available not via methods or functions but as properties defined on $. Many of these flags are focused on helping us divine the capabilities of the current browser, but others help us control the behavior of jQuery ata page-global level. The jQuery flags intended for public use are as follows: $. — Enables or disabled effects $.support — Details supported features $.browser — Exposes browser details (officially deprecated) Let ’s start by looking athow jQuery lets us disable animations. Disabling animations There may be times when we might want to conditionally disable animations ina page that includes various animated effects. We might do so because we ’ve detected that the platform or device is unlikely to deal with them well, or perhaps for accessibility reasons. In any case, we don ’t need to resort to writing two pages, one with and one without animations. When we detect we ’ re in an animation-adverse environment, we can simply set the value of $. to true. This will not suppress any effects we ’ve used on the page; it will simply disable the animation of those effects. For example, the fade effects will show and hide the elements immediately, without the intervening animations. Similarly, calls to the animate() method will set the CSS properties to the specified final values without animating them. Using the jQuery flags One possible use-case for this flag might be for certain mobile devices or browsers that don ’t correctly support animations. In that case, you might want to turn off animations 2 so that the core functionality still $. flag isa read/write flag. The remaining predefined flags are meant tobe read-only. Let ’s take a look at the flag that gives us information on the environment provided by the user agent (browser). Det