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>
  <div class="moon_media_status" id="_moon_static_bg_status">
    <a rel="_moon_static_bg" class="moon_remove_file_button" href="#">Remove Image</a> 
    <div id="test" class="static_preview_image"></div>
    <input type="button" value="Upload File" class="moon_upload_button button" />
</div>
</body>
</html>
 
.static_preview_image {
    height: 500px; 
    width: 500px; 
    background-image: url(http://themes.moonrocketstudio.com/brash/wp-content/uploads/2013/05/bur.jpg);}
.static_preview_image ~ .moon_upload_button{
    display: none;
}
 
$('.moon_remove_file_button').click(function(){
    $('#test').removeClass('static_preview_image');
});
$('.moon_upload_button').click(function () {
    $('#test').addClass('static_preview_image');
});
Output 300px

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

Dismiss x
public
Bin info
anonymouspro
0viewers