0

My DOM has iframe with id="" and name ="".

The iframe has a form inside, inside the form is a table and I need to fire a click event on the table data. The table data(td) has a link. When the link is clicked a function needs to fire off.

How do I get this working using jQuery?

2
  • Maybe this one will help you stackoverflow.com/questions/1609741/… Commented May 7, 2012 at 19:30
  • 1
    Can you post the html you're using? Also blank id and name attributes don't seem correct -- or at least not good practice. Commented May 7, 2012 at 20:18

1 Answer 1

1

Possibly something like this:

$("#iframeID").contents().find("td.data").children("a").on("click", function() {
    // do something
    return false;
});
Sign up to request clarification or add additional context in comments.

1 Comment

The id="" is that case how to use #iframeID also what is td.data. can you explain because the above did not seem to work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.