layer 弹出层去掉默认关闭按钮href属性
弹出层默认关闭按钮,使用<a>标签并且有href属性。造成了鼠标悬浮后会在浏览器左下角出现一个含有href值的白框既然href没有用就去掉。再将其光标样式更改为小手。css更改样式.cursorStyle{cursor: pointer;}js代码layer.open({type: 1,title: false,close...
·
弹出层默认关闭按钮,使用<a>标签并且有href属性。造成了鼠标悬浮后会在浏览器左下角出现一个含有href值的白框
既然href没有用就去掉。再将其光标样式更改为小手。
css更改样式
.cursorStyle{
cursor: pointer;
}
js代码
layer.open({
type: 1,
title: false,
closeBtn: true,
shadeClose: false,
shade: 0.35,
skin: 'contanct-class',
anim: Math.ceil(Math.random() * 6),
area: ['520px', '430px;'],
content: $('#contactUs'),
success: function(layero, index){
layero[0].childNodes[1].childNodes[0].removeAttribute('href');
layero[0].childNodes[1].classList.add('cursorStyle');
}
})
更改前


更改后

更多推荐



所有评论(0)