Skip to content

Instantly share code, notes, and snippets.

Last active August 29, 2015 14:02
What would you like to do?
Initiate play event on click
// jQuery version - we use the .on() function to make sure we can also run the function on dynamically inserted elements.
$(document).on("click", "a.playbtn", function (e) {
var video = $(document).find('#intro-video')[0]; // Find the video element to play; // play the video, simple innit?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment