Jquery笔记
WEB_Mr.Liu
这个作者很懒,什么都没留下…
展开
-
鼠标移入显示提示框类似title属性功能
bindEvent: function () { var _this = this; _this.$element.find('.table-item-list .special').on('mouseover',function(e){ var val = $(this).text(); var thisWidth = $(this).width(); // 获取div 盒子的宽...原创 2020-11-27 11:26:22 · 1405 阅读 · 0 评论 -
拖拽优化
JS拖拽优化 拖拽的实现原理:通过事件mousedown(事件的触发) →mousemove(事件的控制) →mouseup(事件的清除),拖拽的过程就是mousemove阶段; ###问题产生的原因:因为mousemove 的间隔性触发,当两次mousemove事件触发的间隔中,鼠标移动距离出了element的范围,就会产生鼠标脱离element范围,拖拽就停止, 解决方法: 将mousemove事件挂在docment,而不是对应的element,此时鼠标滑动只要不出docment范围就不会触发上述情况。原创 2020-11-17 19:20:50 · 313 阅读 · 0 评论 -
项目中常用的一些功能--jQuery
功能:title属性的拓展: 对是否文本显示全没做出判断,当显示全时鼠标移上去不显示预览盒子;当显示不全时鼠标移上去显示预览盒子 _this.$element.find('.event-dictionary-table-item-list .e-matter').on('mouseover',function(){ var val = $(this).text(); var thisWidth = $(this).width(); // 文本d原创 2020-11-05 11:24:46 · 163 阅读 · 0 评论 -
原生表格模板---jquery笔记
js文件 ; (function ($, window, document, undefined) { function EventDictionaryTableF(ele, opt) { var _this = this; _this.$element = ele; _this.defaults = { data: { } }; _this.data = {原创 2020-11-05 11:16:40 · 246 阅读 · 0 评论 -
jQuery之动画效果命令集合
1、show()显示效果 语法:show(speed,callback) Number/String,Function speend为动画执行时间,单位为毫秒。也可以为slow",“normal”,“fast” callback可选,为当动画完成时执行的函数。 show(speed,[easing],callback) Number/String easing默认是swing,可选linear; $("#div1").show(3000,function(){ alert(“动画显示完成!”); }原创 2020-09-08 16:54:48 · 275 阅读 · 0 评论