Hi,
I'm playing around with the selectable feature. I grabbed most of this from an example. I want the background color of the selected element to change to red, but when I choose another element, the background color should return to original, and let the new selected element be red. How can I do this?
- $(function() {
- $("#selectable").selectable({
- stop: function(){
- var result = $("#select-result").empty();
- $(".ui-selected", this).css("background","red");
- $(".ui-selected", this).each(function(){
- var bg = $("#selectable img").css('.hello');
- var index = $("#selectable img").index(this);
- result.append(" #" + (index + 1));
- });
- }
- });
- });