3 ms·
I don't like the idea of an attribute affecting things that applies what is essentially a CSS property. Besides, any IE version before 11 doesn't seem to suppor
by talmand 10y ago
I don't like the idea of an attribute affecting things that applies what is essentially a CSS property. Besides, any IE version before 11 doesn't seem to support it. Most can't use it yet.
Best case is that you don't have one class that applies block (or whatever) and another that applies none. You let the element display as its default state and then you have a class that hides it, possibly overriding the CSS of the element. You then remove/add the class as needed. The .show() and .hide() in jQuery caused problems like you described for years.
As for your third example, I would say the CSS structure should be considerd broken at that point and should be refactored because something went wrong along the way.