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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:33:19+00:00 2026-06-08T12:33:19+00:00

I have an iFrame. All its elements are loaded. Anyway, I am not able

  • 0

I have an iFrame. All its elements are loaded. Anyway, I am not able to select elements using jQuery selector by “part” of the id/class/etc.

This is my code:

//Not working
$('#iFrameID').contents().find($('[id^="lodingImg"]')));

//Works 
$('[id^="lodingImg"]'))

Dos anyone knew if this type of jQuery selectors do not works in the iFrame. I have recently read that .live is not working in iframe, too. So, my questions is if I am doing something wrong or this is limitation of the library?

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-06-08T12:33:21+00:00Added an answer on June 8, 2026 at 12:33 pm

    .find() will quite happily take a selector as a string, there’s no reason to wrap that selector in a call to the jQuery function. And, in fact, there’s probably a reason not to do so, since I suspect that’s what’s causing your code not to work.

    This code:

    $('#iFrameID').contents().find($('[id^="lodingImg"]'));
    

    will look for elements in $('#iFrameID').contents() that match the elements found by $('[id^="lodingImg"]') – which will be run on the parent window calling the Javascript, not the <iframe> element, and likely return zero elements.

    Simply call:

    $('#iFrameID').contents().find('[id^="lodingImg"]');
    

    instead.

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

Sidebar

Related Questions

I have Facebook in an Iframe for the convenience of my clients. But all
How could I have an iframe that shows the target page and all it's
I have an iframe which contains a few select drop-down lists for data entry.
I have a web application with an iframe that needs to communicate with its
I have a few iFrames that all use a single background image. Whenever I
i know i can have iframe in a html page, say parent.htm, and i
I have an iframe with the id of uploadtarget on my page. <iframe id=uploadTarget
I have an iframe that looks like this: <iframe id=iframe2 ...> #document <html>...</html> </iframe>
I have this iFrame in my parent window... <iFrame src=http://theirdomain.com id=Post_iFrame></iFrame> Then I have
I have an iframe pointing to arbitrary foreign domain http://A . I want to

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.