I have an ul with several li's inside, and each li has a span:
html:
<ul class="list-group">
<li class="atividade-style list-group-item">
<span class="atividade">
Item1
</span>
<div class="pull-right btn-group">
<button class="fa fa-pencil-square-o excluir-atividae btnSemBorda"></button>
</div>
</li>
</ul>
css
.atividade-style {
cursor: pointer;
background-color: #f0f0f0;
}
.atividade{
}
Javascript:
$(".atividade").draggable({
appendTo: 'body',
helper: "clone",
opacity: .95,
refreshPositions: true,
revert: "invalid",
revertDuration: 300,
scroll: false
});
Note that because of the "list-group-item" class the li will always have a size larger than the span, which has a draggable function. I need to make this function be captured and start running when I drag any part of the li and not the span precisely.