电子文档交易市场
安卓APP | ios版本
电子文档交易市场
安卓APP | ios版本

文献翻译JQuery标签的使用

20页
  • 卖家[上传人]:206****923
  • 文档编号:91102075
  • 上传时间:2019-06-22
  • 文档格式:DOC
  • 文档大小:282.50KB
  • / 20 举报 版权申诉 马上下载
  • 文本预览
  • 下载提示
  • 常见问题
    • 1、本科毕业设计外文文献及译文文献、资料题目: Jquery In ActionUsing the jQuery flags 文献、资料来源:著作文献、资料发表(出版)日期:2008.7.15院 (部): 专 业: 班 级:姓 名: 学 号: 指导教师: 翻译日期: 19外文文献:DOM with jQuery utility functions Using the jQuery flags6.1 Using the jQuery flags Some of the information jQuery makes available to us 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

      2、 us control the behavior of jQuery at a page-global level.The jQuery flags intended for public use are as follows: $.fx.offEnables or disabled effects $.supportDetails supported features $.browserExposes browser details (officially deprecated) Lets start by looking at how jQuery lets us disable animations. 6.1.1 Disabling animations There may be times when we might want to conditionally disable animations in a page that includes various animated effects. We might do so because weve detected that

      3、 the platform or device is unlikely to deal with them well, or perhaps for accessibility reasons.In any case, we dont need to resort to writing two pages, one with and one without animations. When we detect were in an animation-adverse environment, we can simply set the value of $.fx.off to true. This will not suppress any effects weve 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 in

      4、tervening animations.Similarly, calls to the animate() method will set the CSS properties to the specified final values without animating them. Using the jQuery flagsOne possible use-case for this flag might be for certain mobile devices or browsers that dont correctly support animations. In that case, you might want to turn off animations so that the core functionality still works.The $.fx.off flag is a read/write flag. The remaining predefined flags are meant to be read-only. Lets take a look

      5、at the flag that gives us information on the environment provided by the user agent (browser). 6.1.2 Detecting user agent support Thankfully, almost blissfully, the jQuery methods that weve examined so far shield us from having to deal with browser differences, even in traditionally problematic areas like event handling. But when were the ones writing these methods (or other extensions), we may need to account for the differences in the ways browsers operate so that the users of our extensions d

      6、ont have to.Before we dive into seeing how jQuery helps us in this regard, lets talk about the whole concept of browser detection. WHY BROWSER DETECTION IS HEINOUS OK, maybe the word heinous is too strong, but unless its absolutely necessary, the browser detection technique should be avoided.Browser detection might seem, at first, like a logical way to deal with browser differences. After all, its easy to say, “I know what the set of capabilities of browser X are, so testing for the browser make

      7、s perfect sense, right?” But browser detection is full of pitfalls and problems.One of the major arguments against this technique is that the proliferation of browsers, as well as varying levels of support within versions of the same browser, makes this technique an unscalable approach to the problem.You could be thinking, “Well, all I need to test for is Internet Explorer and Fire-fox.” But why would you exclude the growing number of Safari users? What about Opera and Googles Chrome? Moreover,

      8、there are some niche, but not insignificant, browsers that share capability profiles with the more popular browsers. Camino, for example, uses the same technology as Firefox behind its Mac-friendly UI. And OmniWeb uses the same rendering engine as Safari and Chrome.Theres no need to exclude support for these browsers, but it is a royal pain to have to test for them. And thats without even considering differences between versionsIE 6, IE 7, and IE 8, for example. Yet another reason is that if we

      9、test for a specific browser, and a future release fixes that bug, our code may actually stop working. jQuerys alternative approach to this issue (which well discuss in the next section) gives browser vendors an incentive to fix the bugs that jQuery has worked around.A final argument against browser detection (or sniffing, as its sometimes called) is that its getting harder and harder to know whos who.Browsers identify themselves by setting a request header known as the user agent string. Parsing this string isnt for the faint-hearted. In addition, many browsers now allow their users to spoof this string, so we cant even believe what it tells us after we do go though all the trouble of parsing it! A JavaScript object named navigator gives us a partial glimpse into the user agent information, but even it has browser differences

      《文献翻译JQuery标签的使用》由会员206****923分享,可在线阅读,更多相关《文献翻译JQuery标签的使用》请在金锄头文库上搜索。

      点击阅读更多内容
    最新标签
    信息化课堂中的合作学习结业作业七年级语文 发车时刻表 长途客运 入党志愿书填写模板精品 庆祝建党101周年多体裁诗歌朗诵素材汇编10篇唯一微庆祝 智能家居系统本科论文 心得感悟 雁楠中学 20230513224122 2022 公安主题党日 部编版四年级第三单元综合性学习课件 机关事务中心2022年全面依法治区工作总结及来年工作安排 入党积极分子自我推荐 世界水日ppt 关于构建更高水平的全民健身公共服务体系的意见 空气单元分析 哈里德课件 2022年乡村振兴驻村工作计划 空气教材分析 五年级下册科学教材分析 退役军人事务局季度工作总结 集装箱房合同 2021年财务报表 2022年继续教育公需课 2022年公需课 2022年日历每月一张 名词性从句在写作中的应用 局域网技术与局域网组建 施工网格 薪资体系 运维实施方案 硫酸安全技术 柔韧训练 既有居住建筑节能改造技术规程 建筑工地疫情防控 大型工程技术风险 磷酸二氢钾 2022年小学三年级语文下册教学总结例文 少儿美术-小花 2022年环保倡议书模板六篇 2022年监理辞职报告精选 2022年畅想未来记叙文精品 企业信息化建设与管理课程实验指导书范本 草房子读后感-第1篇 小数乘整数教学PPT课件人教版五年级数学上册 2022年教师个人工作计划范本-工作计划 国学小名士经典诵读电视大赛观后感诵读经典传承美德 医疗质量管理制度 2 2022年小学体育教师学期工作总结
     
    收藏店铺
    关于金锄头网 - 版权申诉 - 免责声明 - 诚邀英才 - 联系我们
    手机版 | 川公网安备 51140202000112号 | 经营许可证(蜀ICP备13022795号)
    ©2008-2016 by Sichuan Goldhoe Inc. All Rights Reserved.