3 ms·
Is jQuery included in those 4 or 5 lines? One line of CSS in your accordion?
by talmand 10y ago
Is jQuery included in those 4 or 5 lines? One line of CSS in your accordion?
- Touche 10y agoIf you had read the next sentence of my comments you would have seen that it would be a "few more lines" if you didn't use jQuery, basically you need a function like: function eachItem(arrayLike, cb) { return [].slice.call(arrayLike).forEach(cb); } So 3 more lines. If I said you can write a very verbose accordion in under 20 lines would that be good enough for you?
- justinlardinois 10y agoI'm not sure why the actual jQuery library matters here. Chances are if you're using jQuery for an accordion you're also using it for a lot of other things.