I've got some code like this:
- $(".slide-1").hover(
- function () { $('.caption-1').animate({ bottom:0 },200); },
- function () { $('.caption-1').animate({ bottom:-35 },200); }
- );
- $(".slide-2").hover(
- function () { $('.caption-2').animate({ bottom:0 },200); },
- function () { $('.caption-2').animate({ bottom:-35 },200); }
- );
Can anyone help me with cleaning it up so that I don't have to repeat this block over and over manually? I know I can get jQuery to repeat each code block and insert the number automatically, but I'm not sure where to start.
Thanks :)