Obtrusive Javascript Alert!
The “Core Competencies” have done it again… First it was table based layout, now it’s obtrusive JavaScript.
JavaScript is evolving into a beautiful language capable of very deep interactivity. Every day I read a new article about some truly awesome implementation of JavaScript so it breaks my heart when I see something that takes a step back. In the great dark age of content, presentation lived among the content and the world was chaos. As the content grew overburdened with the weight of the inline styles and onClick href links, it sought to shed it’s chains. The content sought to be understood by any and all readers, not just when it is all styled up.
The great Cascading Style Sheet came and blessed the content by gathering up all of the presentation. For a time the content was happy, but alas, they were not truly free.
The content was still burdened with the interactivity elements. These elements floated among the content, becoming confused with the content. Following the lead of the great CSS, the divine ECMA came along and improved the JavaScript language that controlled the interactive elements. The divine ECMA deemed that the JavaScripts should be allowed to rule the content from afar. From this idea, event listeners were implemented.
Today we live in a world where the content is free from the chains of style or script. The possibilities created by these advances are amazing and it is important that we continue the process of separating content from presentation (and interactivity).
To learn about the right way to use JavaScript, please visit this post by Jon Hughes.