0

how can i load load iframe concurently using javascript or jquery? Example :I have iframe[0], iframe[1], iframe[2], iframe[3], how to load them concurrently?

1
  • Any feedback on my answer? Commented Jun 24, 2014 at 4:29

2 Answers 2

3

Set their src attribute:

$("iframe").each(function () {
  $(this).attr("src", ...);
});
Sign up to request clarification or add additional context in comments.

Comments

0

The usage of jQuery is all fine, but its possible with pure JS too, even IE8 supports it. ;)

el.setAttribute('attribute', value);

In your case, it would be:

el.setAttribute('src', 'the/path/to/whatever');

1 Comment

This was meant as a placeholder for the attribute you want to alter.^^ I will add a more specified line of code to show the proper usage.

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.