📜  Supergirl 中的 Tristin Mays - 无论代码示例

📅  最后修改于: 2022-03-11 14:55:21.278000             🧑  作者: Mango

代码示例1
$('.btnMedio').click(function(event) {
    // Preventing default action of the event
    event.preventDefault();
    // Getting the height of the document
    var n = $(document).height();
    $('html, body').animate({ scrollTop: n }, 50);
//                                       |    |
//                                       |    --- duration (milliseconds) 
//                                       ---- distance from the top
});