Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7524919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T03:11:31+00:00 2026-05-30T03:11:31+00:00

Youtube Javascript API code outside jQuery ready function: http://jsbin.com/umituf/1 Inside jQuery ready function: http://jsbin.com/umituf/2

  • 0

Youtube Javascript API code outside jQuery ready function: http://jsbin.com/umituf/1

Inside jQuery ready function: http://jsbin.com/umituf/2

I would like to use jQuery because when the video is stopped (even === 0) and loadmore() method is called, I want to write a ajax call in jQuery to go back to the server and fetch more video id’s so they can be further passed to the cuePlaylist(...) method.

Why am I not able to mix jQuery and the API and How can it be done?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T03:11:33+00:00Added an answer on May 30, 2026 at 3:11 am

    The functions need to be defined in the global scope.

    http://jsbin.com/umituf/3

    Edit for clarification:
    The youtube api script looks for those particular functions on the global scope. The api script does not have access to the scope that is created within the document.ready callback.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

YouTube has URL's like these: http://www.youtube.com/watch?v=zKqeCtjFGFc When I create a PHP page mine would
<script type= text/javascript> var url = http://gdata.youtube.com/feeds/api/videos/VA770wpLX-Q?v=2&amp;alt=json-in-script&amp;callback=; var title; var description; var viewcount; var
I'm working with Youtube API and PHP library: http://code.google.com/apis/youtube/2.0/developers_guide_php.html I'm modifying existing app: http://googlecodesamples.com/youtube/php/YouTubeVideoApp/index.php
JavaScript (jQuery) function display_youtube(new_url) { $('#movie_url').removeAttr('value'); $('#embed_url').removeAttr('src'); $(document).ready(function() { $('#movie_url').attr('value', new_url); $('#embed_url').attr('src', new_url); $('#shade').css('display',
Hello there i got some code here; <script type=text/javascript> $(function(){ var playListURL = 'http://gdata.youtube.com/feeds/api/playlists/8BCDD04DE8F771B2?v=2&alt=json&callback=?';
Is it possible to use Flash JavaScript API with YouTube videos? The only function
I have following ajax call in my JavaScript code url = 'http://news.ycombinator.com/?callback=?'; $.ajax({url:url ,async:!1,dataType:'script',
It looks like the YouTube API does not have a way to stop a
http://www.youtube.com/ You see the search buttoN. it's really nice.
Here is my HTML: <a class=video iframe href=http://www.youtube.com/watch?v=Psk2Pq03rv0&#38;fs=1>Arbitrary text</a> Here is the Fancybox javascript:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.