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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T19:47:27+00:00 2026-06-01T19:47:27+00:00

I have seen something really cool at Yippy They are loading the url in

  • 0

I have seen something really cool at Yippy

They are loading the url in to an iframe for a quick view. I would like to do the same for my website. I’m using the bing API, example: JsFiddle

So I appended an iframe and a div to trigger the load event:

<div class="blok"></div>
<iframe class="ifram" src="" width="100" height="100"></iframe>

And I tried this for the event:

$(".block").click(function () { 

$(".ifram").attr("src", (".desc a", this).text() );
});

Doesn’t work.

  • 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-01T19:47:30+00:00Added an answer on June 1, 2026 at 7:47 pm

    There’s about 6 things wrong:

    1. You’re using .click(), but the results are added dynamically, therefore you need to use a live handler such as .on()
    2. The element is .blok in the html, but you’re binding the event to .block
    3. You’re trying to set the src of every .ifram element
    4. You forgot the $ in front of your selector
    5. You’re passing your selector a context of the element itself, but the anchor you want to find is inside a sibling
    6. You’re accessing the text of the anchor, not the href.

    The following code should do what you want:

    $("body").on('click', '.blok', function () {
        $(this).siblings(".ifram").attr("src", $(this).siblings('p.desc').find('a').attr('href') );
    });
    

    jsFiddle: http://jsfiddle.net/aHCT5/18/

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

Sidebar

Related Questions

I have seen in some source code (by other developers) something like this: #import
I have seen something like the following a couple times... and I hate it.
I am confused about something really simple in ASP.NET. I have seen many times
for (;;) { //Something to be done repeatedly } I have seen this sort
Maybe I am overlooking something obvious, but I have seen in code where you
Now I have something that I have not seen it before: the database is
My question is really very important . When i program i have seen that
I have seen several examples using <a href=<spring:url value='/about/' /> >About </a> I try
Is there a a quick way to validate SOAP messages? I have seen validator
This may be a really basic SQL question, but I have seen a SQL

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.