6
I have this html:
I wish that when the user dragged, the buttons would appear like this:
When you drag it again, disappear ...
How could I do this with Javascript/jQuery?
Follows the code:
<div style="width: 100%; overflow-x: hidden;">
<div class="item-total">
<div class="col s12 m8 offset-m2 l6 offset-l3" style="width: 50%;">
<div class="card-panel grey lighten-5 z-depth-1">
<div class="row valign-wrapper">
<div class="col s3 lista-cartoneira" style="padding-left: 0px;">
<img src="img/user-profile.jpg" alt="" class="circle responsive-img"> notice the "circle" class
</div>
<div class="col s9 lista-cartoneira">
<h1>Teste</h1>
<h2>Exemplo</h2>
</div>
</div>
</div>
</div>
<div class="col s12 m8 offset-m2 l6 offset-l3" style="width: 50%; float: right; margin-top: -136px;">
<div class="card-panel grey lighten-5 z-depth-1">
<div class="row valign-wrapper">
<div class="atalhos-cartoneira col s3" style="background-color: #00b0ff;">
<i class="material-icons">phone</i>
</div>
<div class="atalhos-cartoneira col s3" style="background-color: #ffb74d;">
<i class="material-icons">email</i>
</div>
<div class="atalhos-cartoneira col s3" style="background-color: #757575;">
<i class="material-icons">place</i>
</div>
<div class="atalhos-cartoneira col s3" style="background-color: #00BFA5;">
<i class="material-icons">open_in_new</i>
</div>
</div>
</div>
</div>
</div>
</div>
"drag" what?
– Sam
@Sam when the user fingers this main div to the side, the buttons appeared.
– user131233
Do you want me to drag or be in the Hover when the guy passes the mouse up appears and when he takes the mouse covers? What is this framework you are using?
– hugocsl
Yeah, drag it. I’m using the materialize.
– user131233
It got a little confused because first you said you want me to drag, then you said that when "dnv pass" is to close... If opened dragging would be to close dragging tb not? Until pq if the guy opens dragging and then take the mouse and come back with the mouse up the element will close again since it was open after the user took the mouse...
– hugocsl
@hugocsl That, I expressed myself badly. Opens dragging and closes dragging.
– user131233
I edited the question.
– user131233