我有这个jQuery:切换一类禁用我的链接
$(".button").toggle(function() {
$(this).find(".button").addClass('disable');
},
function(){
$(this).find(".button").removeClass('disable');
});
我对.button链接HTML是:
<a class="button" href="https://stackoverflow.com/users/sign_up">
我的CSS禁用类:
.disable {
background: none repeat scroll 0 0 #F2F0F0 !important ;
border-color: #D1CDCD;
color: #D1CDCD !important;
cursor:default;
text-shadow: 0 -1px rgba(34, 25,25,0.01)!important;
cursor:pointer; box-shadow: none !important;
}
为什么我单击按钮时无法进入/ users/sign_up? .disable类被添加并工作正常,但链接不被采用。
嗯如果你只是想去另一个页面,改变链接的CSS点会是什么? – Esailija 2011-12-31 13:47:19
请稍微显示一下您的HTML代码 – Dion 2011-12-31 13:47:24
为什么会影响CSS链接操作? :S我不明白,对不起... – hyperrjas 2011-12-31 13:52:44