湖南创典教育-视频中心

您身边的教育专家

您身边的育儿课堂

让孩子健康快乐成长,我们为之奋斗的终极理想

孩子叛逆不听话怎么办?

孩子哭闹不爱去幼儿园怎么办?

做有效父母,创和谐家庭

孩子叛逆不听话怎么办?

(function($) { function hideAll() { $(".description:visible").each(function() { $(this).hide("slide", { direction: $(this).attr("data-slide-dir") }, 250); }); $(".overlay-active").fadeOut(); $(".overlay-inactive").fadeOut(); } function showWrapper(wrapper) { $(wrapper).children(".overlay-inactive").first().fadeOut(); $(wrapper).children(".overlay-active").first().fadeIn(); var description = $(wrapper).children(".description").first(); if ($(description).is(":hidden")) { description.show("slide", { direction: description.attr("data-slide-dir") }, 250); } } $(document).ready(function() { var hideAllTimeout; var showTimeout; $(".wrapper").hover( function(eventObject) { clearTimeout(hideAllTimeout); var hover_wrapper = $(eventObject.target).closest(".wrapper").first(); $(".overlay-inactive").each(function() { var overlay = $(this); if (overlay.parent(".wrapper")[0].id != $(hover_wrapper)[0].id) { // Make sure this description is hidden var desc = overlay.next(".description"); $(desc).stop(); if ($(desc).is(":visible")) { $(desc).hide("slide", { direction: $(desc).attr("data-slide-dir") }, 250); } // Show the overlay overlay.fadeIn(400, function() { // Make absolutely certain that the description is hidden var desc = overlay.next(".description"); $(desc).stop(); if ($(desc).is(":visible")) { $(desc).hide("slide", { direction: $(desc).attr("data-slide-dir") }, 250); } }); } }); $(".overlay-active").fadeOut(); showTimeout = setTimeout(function() { showWrapper(hover_wrapper); }, 250); }, function(eventObject) { clearTimeout(showTimeout); hideAllTimeout = setTimeout(hideAll, 250); }); }); })(jQuery);