Bug Tracker

Changes between Initial Version and Version 1 of Ticket #12763, comment 3


Ignore:
Timestamp:
Oct 19, 2012, 12:42:35 PM (8 years ago)
Author:
dmethvin
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12763, comment 3

    initial v1  
    11-1, Not needed.
     2{{{
     3$el.addClass( foo + ' ' + bar + ' ' + baz );
     4$el.addClass( [foo, bar, baz].join(" ") );
     5$el.addClass( arrayOfClasses.join(" ") );
     6$.fn.addClasses = function(){
     7  var $self = this;
     8  $.each( arguments, function(){
     9     $self.addClass( this );
     10  });
     11  return $self;
     12};
     13$el.addClasses( foo, bar, baz );
     14$.fn.addClasses.apply( $el, arrayOfClasses );
     15}}}