Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-2.1.4.js"></script>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
 
      
        <div id="about-page-container">
            <img id="about-page-image" src="http://placehold.it/350x150">
            <div id="about-page" class="about-page-class-off">
                <p></p>
            </div>
        </div>
        <div id="content" class="contentClassOff">
            <h1></h1>
            <img src="http://placehold.it/350x150" alt="Can't find image">
            <img src="http://placehold.it/350x150" alt="Can't find image">
            <img src="http://placehold.it/350x150" alt="Can't find image">
            <h1></h1>
            <img src="http://placehold.it/350x150" alt="Can't find image">
            <img src="http://placehold.it/350x150" alt="Can't find image">
            <img src="http://placehold.it/350x150" alt="Can't find image">
            <img src="http://placehold.it/350x150" alt="Can't find image">
        </div>
  <div id="scroll">
            <a href="#" id="scroll-image"><img src="http://placehold.it/350x150"></a> 
        </div>
</body>
</html>
 
$(function () {
  $('#scroll-image').on('click', function(){
    $('html, body').animate({scrollTop: 1}, 800);
    return false;
  });
  $(window).scroll(function(){
    var scroll = $('#scroll');
    if ($(this).scrollTop() > 400) {
      scroll.fadeIn('slow');
    } else {
      scroll.fadeOut('slow');
    }
  });
});
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers