Lina
Lina

Reputation: 627

jQuery UI Draggable - how to change css of original element?

I need to change font color of original element, after a copy of it being dragged. How should I do that?

jQuery("#tools-container .fieldset-item").draggable({
            revert: "invalid",
            helper: "clone", 
            cursor: "move",
            connectToSortable: ".fieldset-content .sortable",
            stop: function(event,ui) {
            // change helper css   
            }
        }  );

Upvotes: 1

Views: 1276

Answers (1)

Daniel Li
Daniel Li

Reputation: 15379

You would use the css function.

For example:

$(this).css("font-color", "#ff0000");

Reference: http://api.jquery.com/css/

Upvotes: 2

Related Questions