Event delegation and black listing

Whilst finally getting round to cleaning up the Rolling News JavaScript, I realised something about the way we are handling event delegation.

Event delegation is where an event, such as a click, is handled on a higher up, container element. Events can then be triggered on any of the child elements.

However, as with Rolling News, I’ve found that I am having to black list and white list specific elements in order to exclude or include them in the event respectively.

It seems illogical to both black list and white list elements. James is looking into simplifying the event handling as a whole

I am looking into cleaning up the transitions by using max-height instead of height and transitionEnd to allow the content to reflow properly after transitioning.

Posted Tuesday, April 2nd, 2013 under BBC.

Leave a Reply