Adsense

Jquery ui accordion active header scroll to top of div or container ?

var container = $('div'),
    scrollTo = $('#row_8');

container.scrollTop(
    scrollTo.offset().top - container.offset().top + container.scrollTop()
);

// Or you can animate the scrolling:
container.animate({
    scrollTop: scrollTo.offset().top - container.offset().top + container.scrollTop()
});

2 comments:

  1. Thanks for the informative article. This is one of the best resources I have found in quite some time. Nicely written and great info. I really cannot thank you enough for sharing.my sources school signs uk

    ReplyDelete

comment here

newest questions on wordpress