I am a javascript novice trying to work with SoundCloud’s new HTML5 widgets. I don’t entirely understand events yet. The docs page just says
SC.Widget.Events.[something] — fired when [thing happens].
(via http://developers.soundcloud.com/docs/html5-widget).
a code example would be great, and perhaps a basic explanation of how events work. right now i make elements interactive with
element.setAttribute("on[Something]", [function]());
which i understand is not the best way to do this and shows a lack of understanding of javascript events.
anyways, even a link in the right direction would be nice; i’ve been searching in vain for a clear explanation of event handling in javascript that goes beyond onclick etc.
take a look at the playground: http://w.soundcloud.com/player/api_playground.html
and here is working example with
playevent.