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

  • Home
  • SEARCH
  • 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 8485065
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:32:29+00:00 2026-06-10T20:32:29+00:00

So I need to find an element in an iframe that is the exact

  • 0

So I need to find an element in an iframe that is the exact same element of that that is in the webpage (the iframe is of the same page). I need to figure out what the index is of the elements without id’s with jquery so I can get the same element in an iframe.

Edit: How can I find the index of an element?

i.e. for this html:

<div>
    <a>1</a>
    <a>2</a>
    <a>3</a>
    <a id="someA">4</a>
    <a>5</a>
    <a>6</a>
    <a>7</a>
</div>

How would I find the index (so I can it by doing $('a')[index]) of one of the random anchor elements from it’s jQuery object?

(By doing $('#someA').siblings()[Math.floor(Math.random()*6)].getIndex())

jsfiddle: http://jsfiddle.net/YP5hQ/2/

  • 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-10T20:32:29+00:00Added an answer on June 10, 2026 at 8:32 pm

    Alright this is it: http://jsfiddle.net/dan_barzilay/ZB2vE/

    But you got the function all wrong.. i suggest that you will learn about: .get() and .index()

    *notice that i havn’t used any native javascript. it’s no need when you have the wonderfull jQuery 🙂

    **I changed this line: $(elem).html(c); to this: $(elem).html(h); because i thought you ment to do it with h if not simply change the h with an c

    Good Luck!

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

Sidebar

Related Questions

Let's say i need to find all .bar elements inside an element that's assigned
I need the exact borders of the iframe element relative to the whole page.
I need to find an element that has a particular title. The only problem
I need to find out the pixel position of one element in a list
Using Javascript I need to find the best way to add a iframe element
I need to find an element in selenium 2 and I know that the
Hey, i've parsed html doc. need to find all element that has a specified
How to find out form element type by its name using jQuery. For example
I need to find the kth smallest element in the binary search tree without
I need to find an a -tag's ID by its style. My element have

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.