I use Jquery NanoScroller on page:
$timeout(function () {
$('.dialog-window .nano').nanoScroller({preventPageScrolling: true, scrollTo: $('#lastMesasage')});
}, 500);
But this code does not scroll block .dialog-window .nano
to #lastMesasage
. Also does not show scrolling line.
If remnove scrollTo: $('#lastMesasage')}
from options, the scroll line appears.
#lastMesasage
, I would assume, is a typo (should be#lastMessage
?)If you've written the
id
on the element without a typo, there'll be no match - so it won't have an element to scroll to.Note: This is an assumption, so I'll accept downvotes if I was wrong as I don't like to make a habit of answering based on assumptions.