var x = 0;
if (x == 0) {
$('#tap').click(function() {
$('#menuUser').show();
});
x = 1;
document.getElementById('var').innerHTML = "" + x + "";
}
else if (x == 1) {
$('.#wpId').click(function() {
$('#menuUser').hide();
});
x = 0;
}
,当我用它来隐藏#menuUser
如果x=1
,但没有奏效。隐藏DIV点击包装
$? ID和班级? – pregmatch
为什么在jQuery加载时使用'getElementById'? –
你只是设置一些事件的处理程序,而不是执行它们! –