function changeHomePageModule(){
var css = $('#collapseExample').attr('class');
if(css=='collapse'){
$("a:not([href='#collapseExample'])").click(function(event) {
event.stopPropagation();
event.preventDefault();
// return false相当于event.stopPropagation() + event.preventDefault()
});
}else{
$("a:not([href='#collapseExample'])").click(function(e) {
window.event.returnValue = true;
});
}
$('.gridster ul').css("background-color","#EFEFEF");
}
JS 禁用和重新启用a标签的点击事件
原创剑握在手 ©著作权
文章标签 css javascript 文章分类 Html/CSS 前端开发