Here's a demonstration of what I'm trying to do ..
HTML
<div id="conteudo">
<div id="inner" class="move">
<div class="col-md-10"><a class="botao" href="#">botao</a></div>
<div class="col-md-2">22222</div>
</div>
</div>
JS
$( ".botao" ).click(function( {
$( "#inner" ).addClass( "move-left" );
});
);
CSS
#conteudo{overflow:hidden;width:100%;position;relative;height:200px;}
#inner{height:200px;width:120%;}
.move{left:0;position:relative;}
.move-left{left:-20%;position:relative;background:#000!important}
.col-md-10{width:80%;position:relative;float:left;}
.col-md-2{width:20%;position:relative;float:left;}
.botao{width:100px;height:100px;}
I want the contents of col-md-2
to come to the left when clicking on the button, and when clicked out of that element, remove the class move-left