Easy way to add a class name to a clone. #1024

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
@inlineblock

A common addition to clones, is the ability to differentiate the clone from the original. In my case, the navigation item needs to have the "selected" class name styles removed, so if I add another class, it can be done properly.

@@ -114,7 +115,7 @@ var Sortables = new Class({
width: element.getStyle('width')
}).addEvent('mousedown', function(event){
element.fireEvent('mousedown', event);
- });
+ }).addClass(this.options.cloneClass || '');

This comment has been minimized.

Show comment Hide comment
@inlineblock

inlineblock Oct 27, 2011

We could also just test for the presence of a clone class and add it, only if it exists.

@inlineblock

inlineblock Oct 27, 2011

We could also just test for the presence of a clone class and add it, only if it exists.

@DimitarChristoff

This comment has been minimized.

Show comment Hide comment
@DimitarChristoff

DimitarChristoff Nov 3, 2011

Member

why not just use the onStart: fn(el, clone) { clone.addClass("foo"); }

Member

DimitarChristoff commented Nov 3, 2011

why not just use the onStart: fn(el, clone) { clone.addClass("foo"); }

@inlineblock inlineblock closed this Jun 7, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment