[jQuery] Mouseover Fade for all Children Element

Heres a very simple script for those who looking for jQuery script that
  • Applies mouseover / mouseout fade,
  • For all elements in a container.
Note: Just need replace the parent-class-to-apply-effect with the class of the parent container that you want to apply to.


jQuery(document).ready(function() {
	jQuery.each(jQuery('.parent-class-to-apply-effect').children(), function() {
		jQuery(this).mouseover(function() {
			jQuery(this).fadeTo('slow', 0.8);
		}).mouseout(function() {
			jQuery(this).fadeTo("slow", 1.0);
		});
	});
});

:)

Comments

Popular posts from this blog

[Azure Websites PHP] Cross Domain request results in blank response page after Preflight HTTP OPTIONS

[Magento] Create Contact Form with Dynamic Recipient