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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:29:20+00:00 2026-05-18T08:29:20+00:00

I am trying to create an array images to preload by getting each of

  • 0

I am trying to create an array images to preload by getting each of the image link in the rel attributes.

I have on a page:

<div id="gallery_thumbs">
  <a><img src="images/image-1-thumb.jpg" rel="images/image-1.jpg" /></a>
  <a><img src="images/image-2-thumb.jpg" rel="images/image-2.jpg" /></a>
  <a><img src="images/image-3-thumb.jpg" rel="images/image-3.jpg" /></a>
  <a><img src="images/image-4-thumb.jpg" rel="images/image-4.jpg" /></a>
</div>

When the page loads I need to get all the rel attributes in the #gallery_thumbs a img and append these to an array like so:

preload([ 'images/image-1.jpg', 'images/image-2.jpg', 'images/image-3.jpg', 'images/image-4.jpg']);

Can anyone help?

  • 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-18T08:29:20+00:00Added an answer on May 18, 2026 at 8:29 am

    You can use map function:

    $("img").map(function(i,e) { return $(e).attr('rel');})
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im trying to create a array of Checkboxes in Winforms and I have four
I am trying to use Yii's ActiveForm to create a basic registration page with
i am trying to create array from window.location.hash variable but i am failling. My
I'm trying to show all images within a specified directory. The following code lists
I am trying to create a ListView that will be populated with the entries
Good Morning All, I have created a different background and a few other images
I am trying to create a panel with changing pictures. This is my panel:
I am trying to login to a site and then call numerous URLs to
HI, im trying to get the host from a url. sub scrape { my
Hey all, weird question. My company has an application from another company that records

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.