Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
<p>Prueba<p>
</body>
</html>
 
    // Create a refresh function:
    function refresh(){
        // SHOW overlay
        $('#overlay').show();
        // Retrieve data:
        $.ajax({
            url: 'data.html',
            type: 'GET',
            success: function(data){
                // onSuccess fill.container with response data:
                $('.container').html(data);
                // HIDE the overlay:
                $('#overlay').hide();
            }
        });
    }
    
    $(document).ready(function(){
        // Create overlay and append to body:
        $('<div id="overlay"/>').css({
            position: 'fixed',
            top: 0,
            left: 0,
            width: '100%',
            height: $(window).height() + 'px',
            opacity:0.4, 
            background: 'lightgray url(http://bradsknutson.com/wp-content/uploads/2013/04/page-loader.gif) no-repeat center'
        }).hide().appendTo('body');
        
        // Execute refresh with interval:
        setInterval(refresh, 1 * 1000);
    });
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers