HTML5 Video Gallery with jQuery, Adding HTML to the thumbnail links with JavaScript

Now that we are ready to start writing our first JavaScript, let’s come over to video gallery .js. Let’s start with jquery’s (document).ready function. Start with a $().Inside the parentheses we are going to type document.

Outside the parentheses, we are going to type .ready, semicolon, parentheses. Inside of the ready, we are going to type function, beginning and ending parentheses, beginning and ending bracket, and then we are going to split the bracket open.

So this (document).ready function is built into jQuery and once all of the HTML and CSS have been loaded on the page, jQuery will go through and execute all of these statements. So what I want to do is search for every anchor tag with the video Link class.

So to do that we are going to start by typing a $(), two single tick marks inside for a string literal, a. Video Link. Outside of the video Link declaration, let’s type a dot.

We are going to type each, beginning and ending parentheses, semicolon. Inside of the each, we are going to type function, beginning and ending.

Leave a Reply

Notify of