Remove duplicate JavaScript event; support sorting of multiple attributes on the same class