我有一个小的jquery脚本:
$('.field').blur(function() {
$(this).next().children().hide();
});隐藏的子项包含一些链接。这使得无法单击链接(因为它们被隐藏)。对此有什么合适的解决方案?
这是我得到的最接近的结果:
$('.field').blur(function() {
$('*').not('.adress').click(function(e) {
foo = $(this).data('events').click;
if(foo.length <= 1) {
// $(this).next('.spacer').children().removeClass("visible");
}
$(this).unbind(e);
});
});未注释的行应该引用模糊的字段,但它似乎不起作用。有什么建议吗?
发布于 2010-10-31 07:00:44
我相信你可以在这种情况下使用.not('a'):
$('.field').not('a').blur(function() {
$(this).next().children().hide();
});这没有经过测试,所以我不确定这是否会起作用。
https://stackoverflow.com/questions/4053123
复制相似问题