Charuru / lionbars

A free to use, lightweight jQuery plugin that makes scrollbars look like in OSX Lion.
148 stars 61 forks source link

Scroll with javascript #9

Open luiscruz opened 11 years ago

luiscruz commented 11 years ago

Hi,

I need to scroll a div to the bottom with javascript. I'm doing it calling the method I created:

function scroll_to_bottom(elem){
    $(elem).each(function( index ) {
        $(this).scrollTop($(this)[0].scrollHeight)
    });
}

Unfortunately, it doesn't work, though it works fine when I'm not using lionbars.

luiscruz commented 11 years ago

I saw that you already have an implemented method 'scrollToBottom', but I don't know how to call it.

Thanks, Luis

chan-dra commented 11 years ago

https://github.com/Charuru/lionbars/commit/152d1faea9da5940e359f29dc98cf2b35fa401f4 Hope this helps.