I am using jQuery's slidetoggle, and I am wondering if there is a way I can make it slide up from the bottom, everywhere I look I cant seem to find the answer, here is the code I am using:
jQuery(document).ready(function(){
jQuery(".product-pic").hover(function(){
jQuery(this).find('.grid-add-cart').slideToggle('2000', "easeOutBack", function() {
// Animation complete.
});
});
});
You can do it by using a wrapper on the element you want to toggle. Set the position of the wrapper to relative and the position of the element to toggle to absolute with the bottom property set to zero.
Like this jsFiddle example.
jQuery:
CSS:
The simplest way would be to use jQuery UI for that, jQuery alone doesn't have a separate function for it. See here and here.
Other way to go is by doing CSS animations using the animate function.
LIVE DEMO
Do you want to achieve something like this?
HTML
CSS
JS
OR as per Update suggested by Roko