Serial Posted July 29, 2015 Share Posted July 29, 2015 Hi, This is my button in product.tpl : {if isset($features)} <a class="btn btn-primary" href="#features_bot"><i class="fa fa-angle-down"></i> Voir les caractéristiques du produit</a><br /><br /> {/if} The scroll is good, but I want to use jQuery's scrollTo. How can I do ? Thanks. Link to comment Share on other sites More sharing options...
clint Posted July 29, 2015 Share Posted July 29, 2015 (edited) Hi, You could change it from an <a to a <button, stick an ID on it (example #buttonID) and then use $("#buttonID").click(function() { $('html, body').animate({ scrollTop: $("#features_bot").offset().top }, 2000); }); Clint Edited July 29, 2015 by clint (see edit history) Link to comment Share on other sites More sharing options...
Serial Posted July 30, 2015 Author Share Posted July 30, 2015 That's work ! Thanks a lot Link to comment Share on other sites More sharing options...
clint Posted July 30, 2015 Share Posted July 30, 2015 No problem. Clint Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now