0
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;}
http://jsfiddle.net/35DJy/387/
I want that when I click on the boot the content of col-md-2
come left, and when clicked out of that element, remove the class move-left
Now how do I remove the class that was inserted if the user clicks on any screen area other than col-Md-2?
– manzetti.denis
@That doesn’t have the class
col-md-2
or that you are not restrained in a class elementcol-md-2
?– André Ribeiro
I updated the question, see if it’s clearer...
– manzetti.denis
@In this case I think you better ask a new question. This will basically change the whole answer.
– André Ribeiro