you are in: codestackercodes [RSS] → tag: plugin [RSS]

vertical align plugin for jquery Delicious Email

http://www.seodenver.com/simple-vertical-align-plugin-for-jquery/

show/hide lines
   1  (function ($) {
   2  // VERTICALLY ALIGN FUNCTION
   3  $.fn.vAlign = function() {
   4  	return this.each(function(i){
   5  	var ah = $(this).height();
   6  	var ph = $(this).parent().height();
   7  	var mh = (ph - ah) / 2;
   8  	$(this).css('margin-top', mh);
   9  	});
  10  };
  11  })(jQuery);
  12  
  13  // $('#mydiv').vAlign();
created by leozera — 07 August 2009 — get a short url — tags: javascript jquery plugin embed

jquery fade and slide toggle plugin Delicious Email

from: http://www.position-absolute.com/articles/jquery-fade-and-slide-toggle-plugin/

show/hide lines
   1  jQuery.fn.fadeSliderToggle = function(settings) {
   2   	 settings = jQuery.extend({
   3  		speed:500,
   4  		easing : "swing"
   5  	}, settings)
   6  	
   7  	caller = this
   8   	if($(caller).css("display") == "none"){
   9   		$(caller).animate({
  10   			opacity: 1,
  11   			height: 'toggle'
  12   		}, settings.speed, settings.easing);
  13  	}else{
  14  		$(caller).animate({
  15   			opacity: 0,
  16   			height: 'toggle'
  17   		}, settings.speed, settings.easing);
  18  	}
  19  };
  20  
  21  // use: $('#my_div').fadeSliderToggle();
created by leozera — 12 July 2009 — get a short url — tags: javascript jquery plugin embed