ImageVerifierCode 换一换
格式:DOCX , 页数:13 ,大小:18.13KB ,
资源ID:22494689      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/22494689.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(26个Jquery使用小技巧jQuery tips trickssolutionsWord文档下载推荐.docx)为本站会员(b****8)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

26个Jquery使用小技巧jQuery tips trickssolutionsWord文档下载推荐.docx

1、13. );14. 3. 在新窗口中打开链接view plaincopy to clipboardprint?2. /Example 1: Every link will open in a new window 3. $(ahref=http:/).attr(target, _blank4. 5. /Example 2: Links with the rel=external attribute will only open in a new window 6. $(arel$=external).click(function() 7. this.target = ;8. );9. );10

2、. / how to use 11. open link4. 检测浏览器注: 在版本jQuery 1.4中,$.support 替换掉了$.browser 变量。2. / Target Firefox 2 and above 3. if ($.browser.mozilla & $.browser.version = 1.8 ) 4. / do something 5. 6. 7. / Target Safari 8. if( $.browser.safari ) 9. / do something 10. 11. 12. / Target Chrome 13. if( $.browser.c

3、hrome) 14. / do something 15. 16. 17. / Target Camino 18. if( $.browser.camino) 19. / do something 20. 21. 22. / Target Opera 23. if( $.browser.opera) 24. / do something 25. 26. 27. / Target IE6 and below 28. if ($.browser.msie & $.browser.version = 6 ) 29. / do something 30. 31. 32. / Target anythi

4、ng above IE6 33. if ($.browser.msie & 6) 34. / do something 35. 36. );5. 预加载图片2. jQuery.preloadImages = function() 3. 4. for(var i = 0; isrc, argumentsi);6. ;7. / how to use 8. $.preloadImages(image1.jpg6. 页面样式切换a.Styleswitcher).click(function() 3. /swicth the LINK REL attribute with the value in A

5、REL attribute 4. $(linkrel=stylesheet).attr(href , $(this).attr(rel6. / how to use 7. / place this in your header 8. 9. / the links 10. Default ThemeRed Theme12. Blue Theme tallest) 7. tallest = thisHeight;8. 10. group.height(tallest);11. 12. / how to use 13. $(document).ready(function() 14. equalHe

6、ight($(.left15. equalHeight($(.right16. );17. );8. 动态控制页面字体大小用户可以改变页面字体大小2. / Reset the font size(back to default) 3. var originalFontSize = $(html).css(font-size4. $(.resetFont5. $(, originalFontSize);6. );7. / Increase the font size(bigger font0 8. $(.increaseFont9. var currentFontSize = $(10. var

7、 currentFontSizeNum = parseFloat(currentFontSize, 10);11. var newFontSize = currentFontSizeNum*1.2;12. $(, newFontSize);13. return false;14. );15. / Decrease the font size(smaller font) 16. $(.decreaseFont17. var currentFontSize = $(18. var currentFontSizeNum = parseFloat(currentFontSize, 10);19. va

8、r newFontSize = currentFontSizeNum*0.8;20. $(21. return false;22. );23. );9. 返回页面顶部功能2. $(ahref*=#3. if (location.pathname.replace(/,) = this.pathname.replace(/,) 4. & location.hostname = this.hostname) 5. var $target = $(this.hash);6. $target = $target.length & $target 7. | $(name= + this.hash.slic

9、e(1) +8. if ($target.length) 9. var targetOffset = $target.offset().top;10. $(html,body11. .animate(scrollTop: targetOffset, 900);12. return false;13. 15. );16. / how to use 17. / place this where you want to scroll to 18. 19. / the link 20. go to top21. );11.获得鼠标指针值2. $().mousemove(function(e) 3. /

10、display the x and y axis values inside the div with the id XY #XY).html(X Axis : + e.pageX + | Y Axis + e.pageY);7. /DIV8. 12. 验证元素是否为空2. if ($(#id).html() 3. / do something 4. 13. 替换元素).replaceWith(3. I have been replaced5. 14. jQuery延时加载功能view plaincopy to clipboardprint?2. window.setTimeout(funct

11、ion() 4. , 1000);15. 移除单词功能view plaincopy to clipboardprint?2. var el = $(3. el.html(el.html().replace(/word/ig, 16. 验证元素是否存在于对象集合中view plaincopy to clipboardprint?).length) 17. 使整个可点击view plaincopy to clipboardprint?div3. /get the url from href attribute and launch the url 4. window.location=$(this

12、).find(ahref return false;index.htmlhome 1200 ) body).addClass(large6. else 7. $().removeClass(9. 10. $(window).resize(checkWindowSize);11. );19. 克隆对象view plaincopy to clipboardprint?2. var cloned = $().clone();3. / how to use 4. 20. 使元素居屏幕中间位置view plaincopy to clipboardprint?2. jQuery.fn.center = f

13、unction () 3. this.css(position,absolute4. this.css(top, ( $(window).height() - this.height() ) / 2+$(window).scrollTop() + px5. this.css(left, ( $(window).width() - this.width() ) / 2+$(window).scrollLeft() + 6. return this;7. #id).center();21. 写自己的选择器view plaincopy to clipboardprint?2. $.extend($.

14、expr:, 3. moreThen1000px: function(a) 4. return $(a).width() 1000;.box:moreThen1000px8. / creating a simple js alert box 9. alert(The element that you have clicked is over 1000 pixels wide22. 统计元素个数view plaincopy to clipboardprint?p).size();3. );23. 使用自己的 Bulletsview plaincopy to clipboardprint?ul).

15、addClass(Replaced3. $(ul li).prepend( 4. / how to use 5. ul.Replaced list-style : none;24. 引用Google主机上的Jquery类库Let Google host the jQuery script for you. This can be done in 2 ways.1. /Example 1 2. 4. google.load(jquery1.2.65. google.setOnLoadCallback(function() 6. / do something 7. );/SCRIPT type=text/javascript9. 10. / Example 2:(the best and fastest way) 25. 禁用Jquery(动画)效果2. jQuery.fx.off = true;26. 与其他Javascript类库冲突解决方案view plaincopy to clipboardprint?2. var $jq = jQuery.noConflict();3. $jq().show();英文地址:

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1