28 04 2009

橱窗-逃出overflow

bigCat Posted in CSS, JavaScript - Comment.isNotBlank

/* 090424 add by bigCat showCaseHover */\r\nvar timeOutId; //鼠标移出定时器\r\njQuery(".showCaseProductBox ul").bind("mouseenter",\r\n function() {\r\n clearTimeout(timeOutId);\r\n jQuery("#companyShowCase").find(".a").remove();\r\n jQuery(this).find(".hint").clone().prependTo(jQuery("#companyShowCase")).addClass("a");\r\n var offset = jQuery(this).offset();\r\n jQuery("#companyShowCase").children(".a").attr("style", function() {\r\n return 'display:block;left:' + (offset.left + 16) + 'px;top:' + (offset.top + 14) + 'px';\r\n });\r\n jQuery("#companyShowCase").find(".a")\r\n .bind("mouseleave", function() {\r\n jQuery(this).remove();\r\n })\r\n .bind("mouseenter", function() {\r\n clearTimeout(timeOutId);\r\n });\r\n });\r\njQuery(".showCaseProductBox ul").bind("mouseleave",\r\n function() {\r\n timeOutId = setTimeout(function() {\r\n jQuery("#companyShowCase").find(".a").remove();\r\n }, 100);\r\n }\r\n );\r\n\r\n

  1. Asp.Cms says:

    很好,学习了!博主

Host: (miao) | Word: Press | Code: HTML5