【转】译- 26 个 jQuery使用技巧

1. 禁用右键点击(Disable right-click)

2. 禁用搜索文本框

3. 新窗口打开链接

 

4. 检测浏览器

5. 预加载图片(Preloading images)

6. 样式筛选(CSS Style switcher)

 

7. 列高度相同

8. 字体大小调整(Font resizing)

 

9. 返回页面顶部(Smooth(animated) page scroll)

11. 获取鼠标的xy坐标(Get the mouse cursor x and y axis)

});

12. 验证元素是否为空(Verify if an Element is empty)

13. 替换元素(Replace a element)

I have been replaced

‘); });

14. 延迟加载(jQuery timer callback functions)

 

15. 移除单词(Remove a word)

 

 

16. 验证元素是否存在(Verify that an element exists in jQuery)

17. 使整个DIV可点击(Make the entire DIV clickable)

});

18. id和class切换(Switch between classes or id’s when resizing the window)

19. 克隆对象(Clone a object)

});

20. 使元素居中屏幕(Center an element on the screen)

21. 自定义选择器(Write our own selector)

22. 统计元素个数(Count a element)

23. 自定义Bullets(Use Your Own Bullets)

24. 引用google分发的jQuery(Let Google host jQuery for you)

25. 禁用jQuery动画(Disable jQuery animations)

 

26. 防止不兼容冲突(No conflict-mode)

 

 

jquery 速查表:

《【转】译- 26 个 jQuery使用技巧》

 

原贴地址:http://blog.csdn.net/sunboy_2050/article/details/8179162

点赞

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据