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 7642849
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T09:17:41+00:00 2026-05-31T09:17:41+00:00

Without using timeout, I want to use jQuery to check for a video tag

  • 0

Without using timeout, I want to use jQuery to check for a video tag which is soon to be generated. At the time we are looking for the video tag, it does not exist yet.

I could use window.load to wait for the whole window loaded, then call the callback function:

window.load = function () {player = jQuery("#videoid"; }

but is there anyway to “wait” until that particular video tag inserted/loaded into the body then execute the callback func? something like:

jQuery("#videoid").bind('load', function() { player = jQuery("#videoid"); })

thanks in advance

  • 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-31T09:17:42+00:00Added an answer on May 31, 2026 at 9:17 am

    You can delegate a bind to the DOMNodeInserted event for the element so when it’s inserted an event handler will run. This doesn’t work in IE8 and older, but neither do <video> tags:

    jQuery(document).delegate('video', 'DOMNodeInserted', function () {
        alert('Wana watch a video?');
    });
    

    Note that $(<root element>).on(<event>, <selector>, <event handler>) is the same as $(<root element>).delegate(<selector>, <event>, <event handler>).

    Here is a demo: http://jsfiddle.net/vW4Pg/

    UPDATE

    If you’re interested in implementing this idea, make sure to take a look at this: https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Mutation_events

    Thanks for the comment @JFK.

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

Sidebar

Related Questions

How to check visited link using jquery without using any plugin please help to
Without using jQuery, what is the best way to limit text entry of a
I want to use LWJGL in an Eclipse RCP application, but either using the
I want to do Multiple Download/Upload parallely in FTP using C# without using FTPWebRequest.
This question is somewhat related to Handling a timeout in EJB3 without using threads
Without using Javascript, is there a way to make a CSS property toggle on
Without using a WebBrowser control, how could I execute a JavaScript function, that is
Without using plpgsql, I'm trying to urlencode a given text within a pgsql SELECT
Without using any third party program to do this (i.e. without VMware ThinApp, U3
without using a database i wanted a file to point to the newest revision

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.