Davis.js & scrollTo
I'm using Davis.js and and Ariel Flesler's scrolLTo plugin. I'm trying to have the window scrollTo a div on my page:
va开发者_开发问答r app = Davis(function () {
this.get('/products', function (req) {
$(window).scrollTo( '#products', 800 );
})
})
app.start();
This is not working. Any ideas?
Have you made sure that an element with id 'products' is on the page when that route is ran?
It is difficult to try and provide an answer with so little information, do you have a simplified test case that is easy to rerun.
I can't think of any reason why Davis wouldn't work well with scollTo.
精彩评论