Having recently had to work on a client website where jquery wasn't available, it was really apparent just how useful this library is and how pleasureable it makes working with JavaScript. Having to resort back to getElementById and getElementsByClassName was painful in comparison. Today I discovered and made use of yet another useful feature - the trigger method which enables an action on one element to fire the functions associated with events on another. I had a simple accordion style user interface that looked like this: On clicking the cross on the right a panel below would expand and display the content. The mark-up looked like this: 1 < ul id ="list"> 2 < li > 3 < div class ="head"> Title </ div > 4 < a href =""> + </ a > ...
Head of CMS at Umbraco. Previously with digital agency Zone, building solutions on .NET and using Umbraco, EPiServer and Sitecore CMS. This blog is used as a repository for various tips, tricks, issues and impressions drawn from the use of technology in my work and interests. All words are my own.