toggle

by ian_smithz

HTML

<div class="gray">
    <p> Show --> </p>
</div>
<div class="orange" style="display:none">
    <p> -- Hide </p>
</div>

<button class="shift">
shift
</button>

CSS

.gray{
    
    height:100px;
    width:150px;
    background:#eee;
    float:left;    
}

.orange{
    height:100px;
    width:150px;
    background:#fdcb05;
    float:left;     
}

JavaScript

$('.shift').on('click',
                          function() 
                       {
                           $('.gray, .orange').toggle()
                       }
                       );