I’m not talking about commenting your code, although you should be doing that anyway. JavaScript has the ability to create HTML comments: var comment = document.createComment(‘the comment itself’); document.getElementById(‘foo’).appendChild(comment); You can even do it in jQuery: $(‘<!–the comment itself–>’).appendTo(‘#foo’); Now, I know what you’re thinking: why, why would anyone want to create something that doesn’t […]
Monthly Archives: March 2012
How JavaScript animation works
I often find myself looking at certain things that the major libraries do and thinking “I wonder how they do that?” Animation was one of those, so I looked through jQuery and YUI to see how they did it, built my own animation function to teach myself and now that it’s working, I’ll show everyone […]