I want to create a lightweight animation function to help stop me repeating code all over the place. The code is simply an animation({}) call with specific parameters so writing a plugin seems a bit overkill, so how can I create a custom jQuery function so that I can call it like .slideUp but without having to write an entire plugin to do it?
This is what my animation does
$("#id").css({opacity:0,"margin-top":"10px"})
.animate({opacity:1,"margin-top":"0px"},'slow');
Do you mean like this?