O'Reilly logo

Developing Responsive Web Applications with AJAX and jQuery by Sandeep Kumar Patel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Searching for a YouTube video

In this section, we will learn about integrating a YouTube-related search video. YouTube Data API Version 3.0 is the new API to access YouTube data. It requires the API key that has been created in the previous section.

The main steps that we have to follow to do a YouTube search are:

  1. After adding the YouTube Search button, click on it to trigger the search process.
  2. The script reads the data-booktitle attribute to get the title. This will serve as a keyword for the search. Check the following screenshot for the HTML markup showing the data-booktitle attribute:
    Searching for a YouTube video
  3. Then, it creates an AJAX request to make an asynchronous call ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required