为什么不只使用CSS?
.parent:hover .child, .parent.hover .child { display: block; }然后添加不支持:hover的IE6 JS(例如在条件注释中):
jQuery('.parent').hover(function () { jQuery(this).addClass('hover');}, function () { jQuery(this).removeClass('hover');});
为什么不只使用CSS?
.parent:hover .child, .parent.hover .child { display: block; }然后添加不支持:hover的IE6 JS(例如在条件注释中):
jQuery('.parent').hover(function () { jQuery(this).addClass('hover');}, function () { jQuery(this).removeClass('hover');});