I can successfully change the border colour of the placeholder, but when I try change the background colour, nothing happens.
This jsfiddle code best explains it: http://jsfiddle.net/EUVrK/1/
According to the jQuery UI Sortable Documentation you can provide a css class for the placeholder. You should be able to specify the background in this class.
Using the placeholder and the forcePlaceholderSize property, it works like a charm. I've updated the jsfiddle link
Hope that helps.
I got some help from a friend on irc.freenode who suggested the following solution which does the trick.
ui.placeholder.css("visibility", "visible");
ui.placeholder.css("background-color", "red");
The background colour of the placeholder wasn't showing up because the actual element wasn't visible (I suppose it's set to hidden by default). So setting it to visible allows one to see the different background colour.
CSS
.placeholderBackground{background-color:#FD6FB7;}PARAMETER
$('.sortable').sortable({ axis: 'y', placeholder: 'placeholderBackground' }).disableSelection();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With