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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T07:15:35+00:00 2026-06-01T07:15:35+00:00

I’m having a helluva time figuring out how to accomplish this – and I’m

  • 0

I’m having a helluva time figuring out how to accomplish this – and I’m surprised it isn’t a more common occurance throughout the web, though I digress.

I’m building a small site that I’m trying to keep on a single page – in the end the site will live on a USB, so things should be as self-contained (file wise) as possible. Currently I’ve got a navigation menu (ie- Page 1, Page 2, Page 3) vertically, and when you select an link from the menu new content for that section comes up. I’ve got this part down – more or less – thanks to modified Coda-Slider script (See here: http://codysilfies.com/orn/).

The part I can’t figure out is that in addition to changing the content when clicking a menu item, I would like to also change the backgroun. So Menu_Item_1 will show BGImage1.jpg, Menu_Item_2 – BGImage2.jpg, and so on. Something pretty much like this: http://brewfestgb.com/#!/merriment – though there are a bunch of additional features on that page…that I can’t really figure out how to whittle out. There’s got to be a simpler way to do it.

There are a ton of ‘click a single link to change an image’ tutorials around – but nothing with multiple links. I also tried using the same slider code for the background – but I can’t make the image resize to the size of the browser window AND get the slider to work (it needs a set width apparently – which is workable for the content bit, but not when I want the background to resize with the browser).

Any advice…or leads? Seems to me someone should know something. Thanks in advance!

  • 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-01T07:15:36+00:00Added an answer on June 1, 2026 at 7:15 am

    You can change the background-image when the click handler is fired:

    $('a.link').click(function(){
       // Find the image value
       var background = 'BGImage' + $(this).data('bg') + '.jpg';
    
       // Change CSS background-image
       $('body').css('background-image',background);
    });
    

    Your links would have to look something like this:

    <a href="path/to/link1" class="link" data-bg="1">Link 1</a>
    <a href="path/to/link2" class="link" data-bg="2">Link 2</a>
    <a href="path/to/link3" class="link" data-bg="3">Link 3</a>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
In my XML file chapters tag has more chapter tag.i need to display chapters
We're building an app, our first using Rails 3, and we're having to build
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
Does anyone know how can I replace this 2 symbol below from the string

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.