jQuery Extended function for fadeIn and fadeOut

0.61K views
no comments
7 Sep 2014 10:30 am

These three functions of #jQuery save my alot time in jquery elements manipulation, after extended these three function I cannot do first hide element and then fadeIn, and fadeOut_remove save your time and code,without this you need to first fadeout the element then callback a function in after complete of animation to remove the element, and same thing have in fadeOut_fadeIn.

$.fn.extend( {
	fadeOut_remove: function () {
		this_ele = $(this);
		this_ele.fadeOut(700, function () {
			this_ele.remove();
		});
	},
	hide_fadeIn: function (){
		var this_ele = $(this);
		this_ele.hide().fadeIn(500);
	},
	fadeOut_fadeIn: function (){
		var this_ele = $(this);
		this_ele.fadeOut(100, function () {
			this_ele.fadeIn(400);
		});
	}
});

Feel free copy my code and use it in your project but please do not republish at anywhere or site.

NOTE:Your Email Address will be not shown and please do not add spamming comments because here is REL="NOFOLLOW" on your links and comments also moderated shown.
<code>Put html css or any language code under this tag</code>