It seems possible to ever so slightly optimize $.className.add(),
$.className.remove(), and $.className.has() by adding an up-front
check to see if the `className` parameter is a non-falsy value (not
just `undefined`).

This would avoid triggering costly processing such as envoking $.each
loops, .splits() and functions, and even possibly document reflow
(when re-assigning unchanged values to an element).

One could also check for the existence of element.className before
attempting to remove any classNames.

It seems like a place ripe for optimization.

--
Már.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to