2021年11月19日
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文
posted @ 2021-11-19 13:24 陶小黑 阅读(42) 评论(0) 推荐(0)
2021年11月17日
摘要: 构造函数: 原理: 把showName(公共内容)独立出去,否则占用空间 prototype 原型 构造函数的原型 像形化,两个对象,对象所存在的属性(内容),如果想在其他对象中,找到 这个属性(内容): student.prototype=new people("name"); 对象1.proto 阅读全文
posted @ 2021-11-17 17:23 陶小黑 阅读(43) 评论(0) 推荐(0)
2021年11月16日
摘要: $(function(){ $("#loginPopup").click(function(){ $(".pop-bg,.pop-wrapper").show(); //显示 $("body").css("overflow","hidden"); //boby不滚动 }) //.pop-bg,.po 阅读全文
posted @ 2021-11-16 19:24 陶小黑 阅读(36) 评论(0) 推荐(0)
2021年11月15日
摘要: // closest 向外寻找 最近的选择器 例: $(function(){ $(".load-more").click(function(){ // closest 向外寻找 最近的选择器 if($(this).hasClass("active")){ $(this).removeClass(" 阅读全文
posted @ 2021-11-15 17:09 陶小黑 阅读(27) 评论(0) 推荐(0)
摘要: $(function(){ var current=0; var count=$(".pics-list>li").length; // 播放轮播 function move(){ $(".points-list>li").eq(current).addClass("active").sibling 阅读全文
posted @ 2021-11-15 17:08 陶小黑 阅读(40) 评论(0) 推荐(0)
2021年11月12日
摘要: 增加行内样式 display: show() 显示 隐藏 display:none 显示 display:原始值 如果没有原始值 删除display样式 .show(1000) 带路线 延迟 左上角->右下角 hide() 隐藏 .hide(1000) 带路线 延迟 右上角->左下角 toggle( 阅读全文
posted @ 2021-11-12 11:31 陶小黑 阅读(29) 评论(0) 推荐(0)
2021年11月11日
摘要: append 后面面添加子节点 prepend 前面添加子节点 before 前面增加兄弟节点 after 后面增加兄弟节点 wrap 增加父节点 replaceWith 替换 $(".replaceWith").click(function(){ $("li:first").replaceWith 阅读全文
posted @ 2021-11-11 11:27 陶小黑 阅读(44) 评论(0) 推荐(0)
摘要: 鼠标事件:位置区别 page 当前页面右上角 offset 元素的左上角 client 视图可视区域左上角 scveen 屏幕左上角 相对显示器 防抖和节流 作用是:一个人在同时多次调用一个方法是只执行他最后一次 比如满屏幕移动窗口 jquery 阻止冒泡事件 e.stopPropagation() 阅读全文
posted @ 2021-11-11 09:24 陶小黑 阅读(92) 评论(0) 推荐(0)
2021年11月9日
摘要: https://swiper.com.cn/ 轮播图 jquery.zoom 放大镜 https://www.aicesu.cn/doc/animate.html https://animate.style/ 动画 https://www.dowebok.com/demo/131/ 滚动 https 阅读全文
posted @ 2021-11-09 12:19 陶小黑 阅读(77) 评论(0) 推荐(0)
摘要: attr(属性名) 获取属性 attr(属性名,属性值) 设置属性 <script > $(function(){ //全选 $("#sex").change(function(){ var chk1= $(this).prop("checked") $(":checkbox:not([id])") 阅读全文
posted @ 2021-11-09 11:49 陶小黑 阅读(42) 评论(0) 推荐(0)