Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

jquery button top to bottom

jQuery(document).ready(function($){

    // hide the topbutton on page load/ready.
    $('.TopButton').hide();

    //Check to see if the window is top if not then display button
    $(window).scroll(function(){
        if ($(this).scrollTop() > 100) {
            $('.TopButton').show().fadeIn();
        } else {
            $('.TopButton').fadeOut().hide();
        }
    });
    //Click event to scroll to top
    $('.TopButton').click(function(){
        $('html, body').animate({scrollTop : 0},360);
        return false;
    });
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: canvas js filter greyscale 
Javascript :: react native cross out letter 
Javascript :: jquery fadeout and remove 
Javascript :: use eslint in vscode 
Javascript :: what is the correct json content type 
Javascript :: xlsx to json javascript 
Javascript :: link stylesheet in javascript 
Javascript :: url params vue 
Javascript :: browserslisterror contains both .browserslistrc and package.json with browsers 
Javascript :: regex for username 
Javascript :: how to get attr in vuejs 
Javascript :: how to collect keys using lodash javascript 
Javascript :: add active class and remove active class by click 
Javascript :: es ignore 
Javascript :: iterate through json object 
Javascript :: df.saveto json 
Javascript :: how to make link in discord.js 
Javascript :: como actualizar nodejs 
Javascript :: how to get element by id 
Javascript :: react usestate functional update 
Javascript :: react-fragment 
Javascript :: bodyparser deprecated vscode 
Javascript :: javascript two digit number 
Javascript :: javascript kill ajax request 
Javascript :: javascript auto hide navbar 
Javascript :: find inside iframe jquery 
Javascript :: import svg react 
Javascript :: javascript get date 
Javascript :: copy to clipboard 
Javascript :: action checkbox selected vue js 
ADD CONTENT
Topic
Content
Source link
Name
9+6 =