javascript window.onload不会执行的原因
1 js报错了 建议使用”use strict”; 来看 全部变量可以用window.aa=2;解决 变量支持函数多级嵌套 但不支持同级 还有$(this)不支持多级嵌套
2 引用了第三方js
月份:2017年6月
php 微信授权登录传参数方法
php 微信授权登录传参数方法
$callbackUrl='www.baidu.com/?dd=2'; https://open.weixin.qq.com/connect/oauth2/authorize?appid={$wechatAppid}&redirect_uri={$callbackUrl}&response_type=code&scope=snsapi_userinfo&state={$state}#wechat_redirect
可以在回调函数上加上后缀
jquery on绑定事件叠加解决方法
jquery on绑定事件叠加解决方法
代码如下
$('.maoqiu').each(function () { var is_bind = $(this).attr('is_bind'); if (is_bind != 1) { $(this).attr('is_bind', 1); $(this).on('touchend', function () { var that = $(this); that.addClass('fadeOutRight animated'); mcount++; setTimeout(function () { that.remove(); $('.p3_wz2').text(mcount); }, 500) }) } });
jquery swipper 轮播中间图放大解决方案
jquery swipper 轮播中间图放大解决方案
直接把swipper-container 高度设置高一点 然后 图片垂直居中 就不怕放大的时候部分被截取了
.tuandui-swiper-container .swiper-slide-next{ -webkit-transform:scale(1.2,1.2); overflow: visible; }