Nested Callbacks (2013)
The article reflects on a web project from 2013 that used 21 nested JavaScript callbacks to animate a series of CSS triangles. The author, then a beginner, struggled with understanding programming concepts and relied on trial and error to achieve the desired visual effect. Despite the inefficient and overly complex code, the project represented a personal milestone in learning web development.
- ▪The webpage featured 20 rows of triangles created using HTML divs and CSS styling.
- ▪The animation was achieved through deeply nested jQuery callbacks, with each row fading out sequentially.
- ▪The author copied the entire jQuery library into their JavaScript file instead of linking it externally.
- ▪The project was inspired by hand-drawn triangles from a summer road trip and an interest in creating visually appealing content for Tumblr.
- ▪The code was written in Windows Notepad and required careful indentation to manage the nested structure.
Opening excerpt (first ~120 words) tap to expand
March 27, 201321 nested callbacks About 21 months ago, before I even knew what a callback was, I built my first webpage. In honor of its 21 nested callbacks, I think it's about time I finally take a second look at it. At the time I had a perhaps cliche habit of doodling in my notebook during humanities classes and family road trips. One particular summer road trip yielded a collection of triangles that I thought looked pretty cool. I decided that a worthy mid-summer endeavour would be to reproduce it digitally. I also thought that would make me extremely cool on Tumblr. I began by asking CS major friends if they could point me in the right direction.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at Michellebu.