Sortable: Completly hide ghost image

Created on 20 Nov 2015  路  4Comments  路  Source: SortableJS/Sortable

Can i hide ghost image? As i understand i can set

.sortable-chosen {
    opacity: 0;
}
.sortable-ghost {
  background-color: #dadada;
  opacity: 1;
}

but there is one glitch - when i click on element for dragging, but without moving, it's hided via .sortable-chosen and has not yet .sortable-ghost class.

example
http://jsbin.com/poperakusa/edit?html,css,js,output
just click on list item without drag

Most helpful comment

This seemed to work nicely for me.

.sortable-ghost { opacity: 0; }

All 4 comments

.sortable-chosen, sortable-chosen.sortable-ghost {
    opacity: 0;
}
.sortable-ghost {
  background-color: #dadada;
  opacity: 1;
}

http://jsbin.com/velenizega/1/edit?html,css,js,output

@kriscooke i dont want to hide moved element complitly, i wanna hide only ghost copy

This seemed to work nicely for me.

.sortable-ghost { opacity: 0; }

its my solution
.sortable-chosen.sortable-ghost { opacity: 0; } .sortable-fallback { opacity: 1 !important; }

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kinjal-codes picture kinjal-codes  路  3Comments

rakeshrockb picture rakeshrockb  路  3Comments

kaermomo picture kaermomo  路  3Comments

graemegeorge picture graemegeorge  路  4Comments

chrishaigy picture chrishaigy  路  3Comments