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

The Archive Base Latest Questions

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

I have an iframe, inside that iframe occurs dom elements additions by ajax. With

  • 0

I have an iframe, inside that iframe occurs dom elements additions by ajax.

With $(“iframe”).contents().find() y can access and work with .remove() .html() .click() without problems. But i can’t bind events for the new elements added by ajax with live();

my jquery code:

    $("#iframe_id").contents().find("a .tittle").live('click',
        function(e)
        {
              //stuff
        }
    );

But viewing the iframe in a new windows and workinkg with:

$("a .tittle").live('click',function(e)
        {
              //stuff
        }
    );

It works…

Any idea????

Thanks in advice.

  • 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-25T03:30:12+00:00Added an answer on May 25, 2026 at 3:30 am
    find("a .tittle").live('click'
    

    won’t work, regardless of iframes. live() can only be called on a direct selector, not one that comes from traversal methods like find. Doc:

    DOM traversal methods are not supported for finding elements to send to .live(). Rather, the .live() method should always be called directly after a selector

    This is in my opinion a poor, misleading bit of interface design, which is why I’d recommend using the delegate() method in preference to live() in all cases.

    Cross-document (into an iframe) event handling is also likely to be a problem. jQuery is not really designed for interacting with documents from code in different documents. I would recommend loading a copy of jQuery into each document, and handling events and DOM manipulation entirely within the code of that document.

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

Sidebar

Related Questions

I have a script that dynamically loads iframes inside a webpage. You can see
I have an iframe window that displays a report. To access this iframe, I
I have some javascript inside an iframe that sends the height of the iframe
What a mouthful. Basically I have a parent <div> and inside that an <iframe>
I have an iframe that displays a php page inside it when submitting a
i have asp.net page that is opened inside an iframe. How to redirect to
I have an iframe on my page, and inside that iframe I execute code:
I have one entire html openning inside an iframe that contains a javascript function
I have an iframe that acts as a big button. The entire content inside
I have an iframe that loads a page inside it.. when a link is

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.