Link nudging with jQuery continued
Posted by Patrick Lin on Wed 31 December, 2008 at 22:04:52 · Tags: javascript, tutorial
When we left off last time, I showed you how to do simple link nudging with jQuery. In this post, I’ll show you how to add some more CSS styling, so if you haven’t read the previous article, I suggest you read it now before you continue.
The last snippet in the last article was this:
$(function() {
$('a').hover(function() {
$(this).stop().animate( {
paddingLeft:"30px"
}, 300);
}, function() {
$(this).stop().animate( {
paddingLeft:"0"
}, 300);
});
});
Let’s first begin with some CSS. This is the CSS used in this demo:




0