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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T07:34:33+00:00 2026-06-12T07:34:33+00:00

Possible Duplicate: Get URL from background-image Property I’m using the Cycle Plugin and i

  • 0

Possible Duplicate:
Get URL from background-image Property

I’m using the Cycle Plugin and i want to create a pager/thumbnail.

HTML

<div id="slide">
  <div class="panel" id="product">

  </div>
</div>

My Image is on the background of the div. Not inside the div itself

JS Call

pager:'#thumbs',
pagerAnchorBuilder: function(idx, slide) {
return '<li><a href="#"><img src="' + slide.src + '" width="50" height="50" /></a></li>';
},

return '<li><a href="#"><img src="' + slide.src + '" width="50" height="50" /></a></li>';

I’m trying to grab the background image on product. So instead of returning + slide.src + what would i replace this with?

The above grabs the source of the image. How can i grab the background source on the div rather than the image source?

My image is on the div not inside a <img> tag.

**Thanks. **

  • 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-12T07:34:35+00:00Added an answer on June 12, 2026 at 7:34 am

    Not 100% sure on which div you’re wanting the background image of, and where you’re wanting to use it, but…

    $('#product').css('background-image') will give you the URL to the background image of the product div.

    So, following on from this, in your code I think you’ll need it changing to:

    pager:'#thumbs', pagerAnchorBuilder: function(idx, slide) { return '<li><a href="#"><img src="' + $("#product").css("background-image") + '" width="50" height="50" /></a></li>'; },
    

    Final answer, thanks to rsp:

    pager:'#thumbs', pagerAnchorBuilder: function(idx, slide) { return '<li><a href="#"><img src="' + $("#product").css("background-image").replace('url(', '').replace(')', '') + '" width="50" height="50" /></a></li>'; }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: How to get images from URL in Delphi I'm using Delphi 2010,with
Possible Duplicate: PHP REGEX: Get domain from URL I am working on a project
Possible Duplicate: How to get full URL on the address bar using PHP I
Possible Duplicate: Get the resolution of a jpeg image using C# and the .NET
Possible Duplicate: How to get Url Hash (#) from server side c# get complete
Possible Duplicate: get site name from a URL in python For URLs like this:
Possible Duplicate: How to get Url Hash (#) from server side I'm having some
Possible Duplicate: display image from URL retrieved from ALAsset in iPhone My code is:
Possible Duplicate: how to remove index.php from url in codeigniter ? I want to
Possible Duplicate: Get URL of ASP.Net Page in code-behind I'm trying to hold current

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.