随笔分类 -  jQuery

摘要:一、阻止事件冒泡 $().onclick = function(event) { // return false; 1.第一种方法 event.stopPropagation(); 2.第二种方法 通过event对象的方法 } 二、阻止默认行为 $().onclick = function(even 阅读全文
posted @ 2022-04-24 23:57 吃惊夜夜 阅读(171) 评论(0) 推荐(0) 编辑
摘要:var play; if(!play){ //大小图轮播 var sWidth = $(".briefing .briefingLive").width(); var lens = $(".liveBigImg li").length; var indexs = 0; var liLens = (1 阅读全文
posted @ 2022-04-21 18:54 吃惊夜夜 阅读(20) 评论(0) 推荐(0) 编辑
摘要:$(document).ready(function(){ scroll_f(".luck-tip .scroll-box",300); }); //滚动 var scrollIndex = 0; var Timer = null; function scroll_f(obj,time){ clea 阅读全文
posted @ 2022-03-31 14:46 吃惊夜夜 阅读(42) 评论(0) 推荐(0) 编辑
摘要:$(".scrollMenuItem a").each(function() { var _this = $(this); if (window.location.href.indexOf(_this.attr('href')) > -1) { _this.addClass("active").si 阅读全文
posted @ 2022-02-25 10:41 吃惊夜夜 阅读(40) 评论(0) 推荐(0) 编辑
摘要:$(function(){ $(window).scroll(function() { if($(window).scrollTop() >= 450){ //向下滚动像素大于这个值时,即出现浮窗~ $('#catalog').fadeIn(300); //浮窗淡入的时间,越小出现的越快~ }els 阅读全文
posted @ 2021-08-13 16:38 吃惊夜夜 阅读(335) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示