$("#imageMenu li img").bind("click",
function() {
if ($(this).attr("id") != "onlickImg") {
midChange($(this).attr("src").replace("small", "big"));
$("#imageMenu li").removeAttr("id");
$(this).parent().attr("id", "onlickImg");
}
}).bind("mouseover",
function() {
if ($(this).attr("id") != "onlickImg") {
window.clearTimeout(midChangeHandler);
midChange($(this).attr("src").replace("small", "big"));
$(this).css({
"border": "3px solid #959595"
});
//加上这两行就可以了
$("#imageMenu li").removeAttr("id");
$(this).parent().attr("id", "onlickImg");
}
谢谢呢
$("#imageMenu li img").bind("click", function() {
if ($(this).attr("id") != "onlickImg") {
midChange($(this).attr("src").replace("small", "big"));
$("#imageMenu li").removeAttr("id");
$(this).parent().attr("id", "onlickImg");
}
}).bind("mouseover", function() {
if ($(this).attr("id") != "onlickImg") {
window.clearTimeout(midChangeHandler);
midChange($(this).attr("src").replace("small", "big"));
$(this).css({
"border": "3px solid #959595"
});
//加上这两行就可以了
$("#imageMenu li").removeAttr("id");
$(this).parent().attr("id", "onlickImg");
}