3 ms·
Looking at the CSS, I see you're styling the id tags. I'm not a designer, but my experience is that you should only style your ids sparingly and use classes for
by MatthewPhillips 15y ago
Looking at the CSS, I see you're styling the id tags. I'm not a designer, but my experience is that you should only style your ids sparingly and use classes for most stuff.
Also you have a bit of code to recreate some jquery functionality. Maybe for your purpose it's unnecessary to load all of jquery, but consider that if you use Google's CDN, there's a strong chance the user already has jquery cached. Look at the HTML5 Boilerplate for a snippet on how to use Google CDN and fallback to the hosted version. Again, might not be necessary for your limited use case.
- benschwarz 15y agoThere are many schools of thought around using IDs vs Classes, some of the old was that "ID's are faster to parse", but really, its an old habit for many to use IDs. I think the answer is always "it depends", but I'm somewhat using classes and aria roles over IDs now anyway. The "jquery functionality" you speak of is a query engine, but web kit based browsers have "querySelectorAll", which is native C code. jquery uses it (where available)… but being that we were trying to build something that downloaded very quickly on spotty 3g connections, we chose to write a couple of utility functions. (The total byte count for application.min.js is 3186).