Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
  <script>
    $(document).ready(function(){
            $('#sitting').hide();
                $('#right').click(function(){
                    $('#img,#sitting').animate({
                        left:'+=60px'
                    });
                });
                $('#left').click(function(){
                    $('#img,#sitting').animate({
                        left:'-=60px'
                    });
                });
            $('#sit').click(function(){
                $('#img').fadeToggle(-100,function(){
                    $('#sitting').fadeToggle(-100);
                });
            });
        });   
  </script>
  <button id='left'><<</button><button id='right'>>></button><button id='sit'>Sit Down/Stand up</button><br />
  <img src='http://dotcomaftereverything.com/jquery/sprites/spritePerson.png' id='img' style='position: absolute; margin-top: 375px;' /><img id='sitting' src='http://dotcomaftereverything.com/jquery/sprites/spriteSitting.png' style='position: fixed; margin-top: 375px;'><img id='tree' src='http://dotcomaftereverything.com/jquery/sprites/spriteTree.png' style='position: absolute; margin-top: 100px; margin-left: 700px;' /><br />
        <hr style='margin-top: 500px;' />
  
</body>
</html>
To stackoverflow: I just want to detect if the #sitting image is hidden, or shown.
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers