Return to Snippet

Revision: 16473
at August 5, 2009 16:05 by DrewDouglass

Initial Code
		//Define the plugin, named 'linkNudge' 
		$.fn.linkNudge = function(params){
			//set default parameters 
			params = $.extend({
				padding: 20, 
				elapseTime: 300, 
				returnPadding: 0}, params);
			//Traverse every node passed 
				//Define this as a single object 
				var $t = $(this);
				//Proceed to nudge on hover 
					$t.stop().css('cursor', 'pointer').animate({paddingLeft: params.padding}, params.elapseTime);	
				}, function(){
					$t.stop().animate({paddingLeft: params.returnPadding}, params.elapseTime);
			return this;//Allow for chaining.

Initial URL

Initial Description
Plugin Source.

Initial Title
jQuery Link Nudge Plugin

Initial Tags
javascript, jquery

Initial Language