Add text to placeholder in a jQuery Sortable
jquery, jquery-ui
Solution
I think the problem is that even though your conditional statement is looking for '.ui-state-highlight' to be visible it doesn't mean that '$(this)' is referring to that element, unless there is more to the jQuery that isn't shown here. I included a small jsfiddle below that helps explain, hope this helps!
EDIT: I included a new fiddle that I am 99% sure is what you're looking for.
I set-up a sortable list using the example straight off of the jQuery UI - Sortable page, and I took a look at the Events built in with it. There is an event called start that binds an event when sorting starts, I used that to append the text to '.ui-state-highlight'
http://jsfiddle.net/6PrvC/
Problem
I'm trying to add text to the placeholder box that shows while dragging the sortable item. is there a function in jQuery's UI that I'm missing? Right now I'm trying to `.append()` the info, but it's not working. Here's the jQuery function: ``` //Sortable Function - Edit Wizard $(function () { //add text to placeholder box if ($('.ui-state-highlight').is(':visible')) { $('.ui-state-highlight').append('<span>MOVE HERE</span>'); }; $(".sortable").sortable({ placeholder: "ui-state-highlight", //revert: true, grid: [20, 20], handle: '.editMove', opacity: 0.6, scroll: true, scrollSensitivity: 80, zIndex: 10 }); $(".sortable").disableSelection(); }); ``` Edit I guess there needs to be some `.live()` change function for the `.append()`?