Closed chrislp closed 13 years ago
I would disagree with this being the default behavior for a number of reasons. Here are a few off the top of my head:
select
, so if that class is copied to the new element I can no longer find my original select
elements by class.While this could be added as a configuration option, I'm not sure what the use case is . . . could you elaborate?
My 2 cents is that it would be far more useful to be able to specify a list of classes in the configuration options that are automatically applied to the new elements. For example:
$('#element').sSelect({defaultClasses: 'myCalss yourClass'});
Thoughts?
Your points are right but there's one thing I'd disagree. If I write css for the select and plan to use sSelect it should work with the select-element and sSelect's container-div. However your proposal is most flexible so I give it a definite thumbs up!
Adding $containerDiv.addClass($input.attr('class')); in line 68 would add the original select element's css class to the newly created element. I think that would be very useful - any opinions?