PDA

View Full Version : jQuery Link Nudge question



mikes02
April 30th, 2009, 09:30 PM
$(document).ready(function() {
$('a.nudge').hover(function() { //mouse in
$(this).animate({ paddingLeft: '20px' }, 400);
}, function() { //mouse out
$(this).animate({ paddingLeft: 0 }, 400);
});
});

I am using David Walsh's link nudge script, but there is a problem, I have a multi-column layout using floated divs, and the nudge is causing it to push the div next to it over, is there any way around that happening? or will this only work if the div is plenty wide to accommodate the nudge? Would also like to point out that in this particular case making the divs wider is not an option. I may have answered my own question with that, but I'm just curious...

nobody
April 30th, 2009, 11:03 PM
Without seeing any relevant code or a link to this script or anything whatsoever I'm going to suggest that your assumption is correct.

If your divs are being stretched and they're being floated then most likely something is going to go wrong if you don't have the proper room.

Post a screenshot or some more code or a link if you want a more solid answer.

mikes02
May 1st, 2009, 12:45 AM
After playing with it some more I have basically determined that there just isn't enough room for this effect due to the length of the link text.